Saving UserPreferences with React Native

I am trying to run a few examples using response-native, and I was curious to see how to save user settings using NSUserDefaults with React Native.

Do we need to implement a module that exports the NSUserDefaults method, as indicated here

+5
source share
4 answers

Instead, can you try AsyncStorage ?

+6
source

I created a bridge module that interacts with NSUserDefaults. If you still wanted or needed it (that is, you already have an application that already uses NSUserDefaults), check it out: https://github.com/dsibiski/react-native-userdefaults-ios

:)

+5
source

I created a component for using NSUserDefaults, it has a set and get method, very easy to use, suitable for storing this small, insensitive and persistent information or user settings.

+1
source

I searched, but it looks like there is no module for this yet, but it should not be so difficult to implement. This guide will help you with the implementation of the adaptive module: https://facebook.imtqy.com/react-native/docs/nativemodulesios.html#content

0
source

All Articles