react-native-shared-preferences
react-native-shared-preferences copied to clipboard
Cannot change name of sharedPreference
I had different named sharedPreferences for my Android app: "myPrefs", "userPrefs", etc. When I used this library to get sharedPreferences from "myPrefs", I called:
SharedPreferences.setName('myPrefs');
Using this, I was able to get key -> value pairs in "myPrefs". But when I wanted to change the sharedPreference to "userPrefs" and I call the same code with "userPrefs", the sharedPreference does not change. It is stuck at "myPrefs".
Hi,
I just added a pull request for this: #29
Hope it's going to be accepted.