-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SSR example #11
Comments
I think I would need some help for that, I don’t understand ssr good enough, but would gladly welcome prs. |
I tried to set the default state with storeApi but This package is based on |
could you explain why useLayoutEffect is a problem when it comes to SSR? |
Above error message keeps being logged. typeof window !== 'undefined' ? useLayoutEffect : useEffect Can it be the solution to this case? Related issue: |
yes, i guess that could be. could you try? you can copy this: https://unpkg.com/[email protected]/dist/esm/index.js into a local "zustand.js" and change it to useEffect. if it works i'll implement the patch. |
@drcmda |
can this issue be closed? does it work? thanks! |
That PR never landed in the repo 😞 |
Can we revisit this issue?? Seems there was never a solution implemented. |
Hi, is it about hydration not working, or is it completely broken with next? Would you like to file a new issue please? Note: useIsoLayoutEffect is just a hack to eliminate the warning message. It doesn't do anything for SSR. |
Let me reopen this.
Where can I find such examples with useContext, so that I can start learning? There must be something in the nextjs docs. |
I changed my mind. Let me close this and continue discussion in #182. |
I think I almost have it working using a tweaked version of the redux next.js example, but the state gets wiped out on the client
The text was updated successfully, but these errors were encountered: