-
-
Notifications
You must be signed in to change notification settings - Fork 623
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 documentation for useAtomCallback. #2150
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. Latest deployment of this branch, based on commit e26313f:
|
6a819a5
to
eb4e045
Compare
See pmndrs#2149. The docs were for Jotai v1; update for v2. The change is that the callback function passed to `useAtomCallback` no longer returns a Promise; it just returns the atom value.
eb4e045
to
5328052
Compare
Just update the id in the docs. |
Done - e26313f I marked this PR as ready for review. |
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!
Thanks for your contribution!
Update the
useAtomCallback
documentation.The docs were for Jotai v1; update for v2. The change is that the callback function passed to
useAtomCallback
no longer returns a Promise; it just returns the atom value.@dai-shi I forked the CodeSanbox example here, removing the
await
that is no longer needed. However I wasn't sure how to update the CodeSanbox link (id) in the docs.Related Issues or Discussions
Fixes #2149
Summary
Update the `useAtomCallback documentation for v2.
Check List
yarn run prettier
for formatting code and docs