Possible typo in the docs connect state to URL example #3411
Replies: 2 comments 3 replies
-
|
@dbritto-dev Can you take a look? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@AmitaiRosenbaum @AmitaiRosenbaum there's no typo, in this scenario that |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
In the docs, there is the following example for creating your own hash storage
However, in
zustand/esm/middleware/persist.d.mts, the following interface is declared forStateStorage.Unless I have missed something, it looks like there is an inconsistency between the declared return type, and the return type given in the example docs.
E.g. the get should return
string | nullbut returns the output ofJSON.parse.Reproduction Link
https://zustand.docs.pmnd.rs/learn/guides/connect-to-state-with-url-hash
Beta Was this translation helpful? Give feedback.
All reactions