Closed caevv closed 1 year ago
There shouldn't really be anything about the component that could cause a hydration error. Are you sure it's not from something else?
How exactly are you using it?
I also encountered this error when using NextJS, probably due to the library.
I also encountered this error when using NextJS, probably due to the library.
In the source code of the component you can see that on the server it will just return an empty wrapper element, and only on the client, after useEffect
gets triggered (after hydration) the animation starts.
I can't find anything that would be different server-side compared client-side which could cause a hydration error.
I also use it with Next.js (page directory, not the new app directory), and at least in my case things like reading cookies on both server- and client-side cause hydration errors, but it's never this package's component fault.
It would be helpful if you guys could post your nextjs version and some examples of how exactly you use the component.
Thanks for looking into it @maxeth, I found the issue for me, it was just because I was wrapping it with a <p>
:O