Discussion: Provide jotai/nextjs utils
See original GitHub issueWe already provide some examples about how to use Jotai with Next.js and SSR in general.
This issue looks to start a discussion if it’s possible for Jotai for provide a better story for using Jotai in a SSR scenario - We believe we could start with Next.js.
I believe this would be mostly useful in the scenario, where you have async atoms, which fetch their state using e.g. fetch
.
This is mostly inspired Next.js story for react-query: https://react-query.tanstack.com/guides/ssr
Let me think what you think - Should we provide something, or should we just document how to with our current API for “hydration” of atoms.
Issue Analytics
- State:
- Created 3 years ago
- Comments:25 (7 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi everyone, there’s a new hook
useHydrateAtoms
- Please try it out in your Next.js app!jotai/nextjs would be very specific to nextjs depending on functions from nextjs. If there were any generic SSR utils, we should put them in jotai/utils.