Storing UserPreferences with a React Native App
You may try AsyncStorage instead?
I created a bridge module that interfaces with NSUserDefaults. If you still wanted or needed it (ie. you have an existing app that uses NSUserDefaults already), check it out: https://github.com/dsibiski/react-native-userdefaults-ios
:)
I've created a component to use of NSUserDefaults, it have set
and get
method, much easy to use, suits for storing those small, insensitive and permanent info or user preferences.
- Github: https://github.com/wwayne/react-native-user-defaults
- NPM: https://www.npmjs.com/package/react-native-user-defaults