one icon indicating copy to clipboard operation
one copied to clipboard

SSR not working with some libraries

Open clayrisser opened this issue 1 year ago • 6 comments

I get the following error in certain libraries, such as @tanstack/react-query. I'm assuming it has something to do with the way the bundler adds react. Perhaps react is out of scope or an issue with the way it does SSR.

Error in handleSSR: TypeError: Cannot read properties of null (reading 'useEffect')

This error happens in ssr and ssg mode, but does not happen in spa mode. I'm wondering if the "use client" decorator is ignored.

Here's a related issue to this.

https://github.com/TanStack/query/issues/5419

clayrisser avatar Oct 06 '24 15:10 clayrisser