Skip to content

Zustand persist middleware unexpectedly saves state retrieved from persist layer #2663

Discussion options

You must be logged in to vote

Thanks for reporting! It sounds reasonable. I wonder how it causes an actual problem, but I understand it could.

The implementation looks good overall:

  • Please only modify newImpl
  • return [...] as const should avoid as [boolean, S]

Would you like to send a PR? A test would be necessary.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@double-thinker
Comment options

@double-thinker
Comment options

@dai-shi
Comment options

Answer selected by double-thinker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants