-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent state with Local Storage #18
Comments
I hear ya, it's a common enough need. Considering this is pretty easy to do manually, I kinda think it should stay out of the main library, just in an effort to not add bulk. There might be a good way to abstract this also, like into a higher order function of some kind like: import { picoapp } from 'picoapp';
import persist from 'picoapp/persist';
const app = persist(picoapp)({ ... }); What do you think of that? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What are your thoughts on pico having an opt-in ability to store the app's state into local storage for the browser, this could help cut down on web requests on ajax heavy pages for example an e commerce shop with a cart. The cart could be stored in state and then immediately hydrated instead of having to wait for a fetch.
The text was updated successfully, but these errors were encountered: