generalui / hooks-for-redux

modular redux - in half the code
MIT License
96 stars 13 forks source link

Local storage example #13

Open cosmovane opened 2 years ago

cosmovane commented 2 years ago

This PR resolves issue #8 It includes an example (in examples/persistence-local-storage) to show how to add persistence with local storage using the virtual store.

Any suggestion is welcomed :)

drumnation commented 2 years ago

I tried to do this in react native which uses AsyncStorage instead of LocalStorage which requires a promise await AsyncStorage.getItem('TASKS');` and had some issues. If anyone has success with this and can provide an example that would be appreciated.