react-native-shared-preferences icon indicating copy to clipboard operation
react-native-shared-preferences copied to clipboard

Cannot change name of sharedPreference

Open kirtan96 opened this issue 5 years ago • 1 comments

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".

kirtan96 avatar May 13 '20 03:05 kirtan96

Hi,

I just added a pull request for this: #29

Hope it's going to be accepted.

skrafft avatar Feb 23 '21 15:02 skrafft