-
Notifications
You must be signed in to change notification settings - Fork 209
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
About SSR #215
Comments
hey @moRanou , <div suppressHydrationWarning={true}>
{process.browser && <Popup />}
</div> |
@yjose This has the downside of the trigger (ie a button) not prerendering. It would be great if there was native SSR support |
Any update to this issue? it's still a problem for me. |
Hello, I am using next.js 12 and react 18. So I am using SSR. The following did cause me an error.
This is the one the solved it for me.
Rather than passing the button as a trigger declare it in the popup component within the same div. Controlled Popup -> https://react-popup.elazizi.com/controlled-popup/ |
The above workaround from @lukacspapp also works for me. Thank you ❤️. A small issue in your example is that you also need to register |
I suppose this is the best way to fix this problem on Next.js.
|
This workaround sucks if you're testing your component. It's easy to run into a race condition. |
Hello, I would like to ask a question about SSR,
Here are the errors I get in next.js
However, when I turned off the component SSR, it worked fine;How can I use this component without turning off the SSR functionality of the framework?
Looking forward to your reply. Thank you;
The text was updated successfully, but these errors were encountered: