This repository has been archived by the owner on Dec 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
README doesn't mention state persistence #20
Comments
If you want to use Local Storage you should have a look at cycle-storageify. Basically you can wrap your main in the storage technology of choice before wrapping it in onionify. I think the general pattern for the storage wrapper is:
A simplified storageify version could be:
Please someone correct me, if I'm totally wrong. |
@lopsch Thank you, I'd not come across that, only storage drivers (or HTTP with JSON payload). I'll explore. I think top level persistence will do fine for my use case as performance of deep hierarchy should not be an issue |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What are the good patterns for persistence when using onionify
I guess we can hydrate in an initial/default reducer, either in in the top level component or individual components according to your preferences?
How about persisting though?
Or do you think there's no point being prescriptive? Even if this is your view examples would be helpful.
BTW I thought this was a very interesting series on state - https://getpocket.com/a/read/1657730920
The text was updated successfully, but these errors were encountered: