-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
useStore uses ReadonlyStoreApi #2586
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
Let me know if you want me to open a similar PR targeting the v5 branch. |
dai-shi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think I can take care of the rest. Thanks for your contribution!
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Related Issues or Discussions
Fixes #2581
Summary
UseBoundStoretypes were relaxed in #1589 because the internals of this method did not use any of the setters, only getters. We can also do this foruseStoretypes because its API only uses getters.Context: I am building a library that returns a store API with only getter methods exposed and I would like folks to be able to pass this directly into Zustand's
useStoreReact helper.Check List
pnpm run prettierfor formatting code and docs