Closed cupcakearmy closed 5 years ago
Hey, thanks!
I haven't thought much about persistence. It may take some time for me to think about how persistence support should be for createGlobalState
.
As for createStore
, technically you can use Redux-style middleware, and it's probably better to do so instead of having side effects in a reducer. I'll make an example later, but meanwhile you can try that too.
Maybe one could do a small github wiki entry and link it in the README.
That sounds like a nice idea, because I want to keep the library itself small, but there would be many use cases and tips. Do you mean that I simply create a wiki placeholder in this repo?
That sounds like a nice idea, because I want to keep the library itself small, but there would be many use cases and tips.
Yes, keeping it small is a good idea.
Do you mean that I simply create a wiki placeholder in this repo?
Simply the repository wiki and add the link to the README.md
🙂
@CupCakeArmy I made an example. Hope it helps. Note that this is just one implementation, and there could be many. https://github.com/dai-shi/react-hooks-global-state/tree/master/examples/13_persistence
@CupCakeArmy The wiki is set up. Free free to edit it. I will add the link once we have several contents.
Maybe you can link it in the main README, so people can find it easily :)
https://github.com/dai-shi/react-hooks-global-state/wiki/Ideas
First off: awesome library! No deps, simple, clean, love it! ❤️
Are there any ideas for persistence? Right now I'm doing this and it works pretty good 💪
Maybe one could do a small github wiki entry and link it in the README. Any thoughts/ideas?