-
-
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
Issues on initial page load on NextJS v13 #1529
Comments
Sounds like related with pmndrs/zustand#1395 in zustand. |
I think you're right—I neglected to mention this only occurs when you add |
would it be as easy as adding "use client" to the |
Jack Herrington made a great video about this I think.. YouTube Video We really have to think differently when using React Server Components. |
Closing as a resolution is |
Not sure exactly what's going on here, but I've created a minimal repro on CodeSandbox that shows the issue.
The error is
TypeError: Cannot read properties of null (reading 'useContext')
Commenting out
useAtom()
in/components/Clock.js
and replacing its variables with hardcoded values causes the page to render correctly:Once you've loaded the page, you can add the
useAtom()
call again and remove the hardcoded definitions and the page will work as expected. Possibly something related to SSR or hydration?The text was updated successfully, but these errors were encountered: