-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
addon API for storing state per-session or per-app. #5271
Comments
Here's what I sketched out in my head: What if we update function setState(update: object, persistence: 'none' | 'session' | 'forever') {} When we When we initialize the state, we will combine:
Merging them with preference in that order (i.e. |
w00t!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-alpha.9 containing PR #5289 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
@shilman, this is not working in the beta.1 version. (not sure about the prior versions) For example, in a decorator I call Any clue or should I open a new issue?! |
@leoyli -- I think open a new issue. This issue was specifically about an API to replace the |
I see, I will take a time to gather enough information and try to reproduce it using some sandbox or in a new project. After that I can open an issue! Thanks! |
any news with this? |
Issue: we removed the use of URL params for storing state. This will be an issue if apps reload (e.g. because HMR isn't working right, see for instance #5267).
Right now we have an adhoc way of using
session/localStorage
for storing things. We also have retainedsetQueryParams
but it no longer actually affects the URL so will not survive reloads etc.We should resolve this for v5.
The text was updated successfully, but these errors were encountered: