Persist storage : values are converted to strings before replacer #2403
Unanswered
karbone4
asked this question in
Bug report
Replies: 3 comments 7 replies
-
Do you have an idea how to fix it? |
Beta Was this translation helpful? Give feedback.
7 replies
-
Here's the test code: zustand/tests/persistSync.test.tsx Lines 698 to 708 in c092d76 Hmm, I'm not sure how it's not working with |
Beta Was this translation helpful? Give feedback.
0 replies
-
The same problem with Duration / Timestamp from @bufbuild/protobuf. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I am trying to use
persist
with dates.Bug: values are converted to strings before replacer function so I cannot convert it back to date because I couldn't apply
type: 'date'
to convert it to date inreviver
Link to reproduction
Code sandbox
Check List
Please do not ask questions in issues.
Please include a minimal reproduction.
Please check this if you're filing an issue regarding TypeScript.
create
is to be used ascreate<T>()(...)
and notcreate<T>(...)
.Beta Was this translation helpful? Give feedback.
All reactions