How to use the react-native-macos.AsyncStorage.getItem function in react-native-macos

To help you get started, weโ€™ve selected a few react-native-macos examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github knoopx / plex-music-react-native-macosx / src / Stores / Account / Account.js View on Github external
@action async getLoginParams(): Promise {
    const loginParams = await AsyncStorage.getItem('loginParams')
    if (loginParams) { return JSON.parse(loginParams) }
    return null
  }
github bbqsrc / sax / src / containers / app.js View on Github external
componentDidMount() {
    AsyncStorage.getItem(ACCESS_TOKEN).then(token => {
      if (token) {
        const { host, accessToken } = JSON.parse(token)
        store.dispatch(actions.setAccessToken(host, accessToken))
      }
      
      this.setState({
        loading: false
      })
    })
  }
github knoopx / plex-music-react-native-macosx / src / Stores / Account / Account.js View on Github external
@action async getClientIdentifier(): Promise {
    const value = await AsyncStorage.getItem('X-Plex-Client-Identifier')
    if (value) { return value }
    const newValue = UUID.v4()
    await AsyncStorage.setItem('X-Plex-Client-Identifier', newValue)
    return newValue
  }