-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
fix(examples, tests): use useUpdateAtom
and write-only atoms to avoid re-render
#598
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pmndrs/jotai/AxkR7Aa5QqLHeU91FBcuJ3LwdeUU |
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. Latest deployment of this branch, based on commit d8c400e:
|
Thanks for your help. However, I would like to keep If you can adjust it, please go ahead. I can take it over if you like. |
useUpdateAtom
to avoid re-renderuseUpdateAtom
to avoid re-render
@dai-shi
If necessary, I can undo changes other than utils tests and examples. |
useUpdateAtom
to avoid re-renderuseUpdateAtom
and write-only atoms to avoid re-render
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.
Looks good. As I said, I don't think it's very important to avoid re-renders in some of core tests, but someone may learn coding pattern from tests, so it'd be good as you suggest.
Yes, that's why I kept the comments in the sample code. |
Response to the call for this issue