Closed oskarhertzman closed 5 months ago
I made a pr for this on #1044. Please Check it out!
You can do dynamic importing just for now to bypass this issue.
const ToastContainer = dynamic(() => import('react-toastify').then((mod) => mod.ToastContainer), {
ssr: false,
});
Deploying the fix as soon as the build is green
Do you want to request a feature or report a bug?
Report a bug with react-toastify@v10.0.1
What is the current behavior?
Getting a next.js server warning log:![image](https://github.com/fkhadra/react-toastify/assets/43958723/bfe83669-8abe-475a-91b8-88fbcfcaaec4)
What is the expected behavior?
Not getting a server warning log about useLayoutEffect usage on the server.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Chrome: 120.0.6099.216 React: 18.2.0 Next.js: 14.0.4