Closed Firstyear closed 2 years ago
A persistent store checks for previously saved state on startup, using default if none is found. Right now the only way to customize this is by manually implementing Default, or using a custom Store.
Hmmm this really wasn't clear from any of the documentation or examples though. would it be possible to extend that in the persistent store docs and/or the examples?
Yes absolutely! Docs are in dire need of improvement, definitely a focus for next release.
Well, feel free to ping me to perform docs review / examples review if you would like :)
New implementation is much simpler, with more control given to user. Examples and docs are done as well, think it's safe to close this.
Thank you @intendednull! I'll have to give the latest update a go :) Appreciate your time and work!
It's not clear how when using a persistent store how these values are restored at app reload - generally most examples seem to apply a default value such as https://github.com/intendednull/yewdux/blob/master/examples/store/src/main.rs#L35 but if you had a persistent store, is there a way to say "okay, load this value OR use this default?"