-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
add examples/54_jotai #1198
base: main
Are you sure you want to change the base?
add examples/54_jotai #1198
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
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. |
When I click the button, I see it updates the client store value and then uses refetch to re-render the current page (or really the whole app with the minimal client) on the server. A fetch request is made to /RSC/_.txt with components/counter.tsx#countAtom and the new client store value in the payload. The waku-jotai Provider examines the incoming RSC payload of each request and uses it to update the store with the atom values which are recreated per request with React server's |
That's a great summary. Thanks! Technically, Avoiding full rerender is not a specific problem to the jotai integration, and we should tackle separately. (I don't have any solutions at the moment, and if anyone has an idea, happy to hear.) |
It's still a proof-of-concept. We should hide the complexity with an integration library.