Skip to content
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

Document for state with URL hash. #1254

Closed
joel-jo-querypie opened this issue Sep 2, 2022 Discussed in #1251 · 2 comments · Fixed by #1267
Closed

Document for state with URL hash. #1254

joel-jo-querypie opened this issue Sep 2, 2022 Discussed in #1251 · 2 comments · Fixed by #1267
Labels
documentation Improvements or additions to documentation

Comments

@joel-jo-querypie
Copy link
Contributor

joel-jo-querypie commented Sep 2, 2022

Discussed in #1251

Add a state with URL Hash using persist middleware accepts custom storage like hashStorage.

@joel-jo-querypie
Copy link
Contributor Author

I work on this. Thank you!

@joel-jo-querypie joel-jo-querypie changed the title Update for state with URL hash. Document for state with URL hash. Sep 2, 2022
@dai-shi dai-shi added the documentation Improvements or additions to documentation label Sep 2, 2022
@vadimshvetsov
Copy link
Contributor

vadimshvetsov commented May 11, 2023

Hey @guymoon, thanks for this example that looks interesting on the zustand docs page.

Do you have any idea why it doesn't work even in this codesandbox example? When we refresh page url hash just updates to the initial state.

UPD: Figured out that it's because of lack JSON.parse on getItem. Opened PR here with fix - #1800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants