react-ssr-prepass
react-ssr-prepass copied to clipboard
TypeError: Cannot read properties of undefined (reading 'current')
trafficstars
Is there an existing issue for this?
- [x] I have searched the existing issues
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Question
Hello,
I'm using next-urql, which has ssr-prepass built in. After upgrading to React 19 and Next.js 15, I'm encountering an issue. According to an urql maintainer, this seems to be related to your library. Could you provide guidance on resolving this?
Thank you!
https://github.com/urql-graphql/urql/discussions/3732#discussioncomment-12246852
Edit 1: I tried some dummy examples on the latest react and next packages and I am still getting the same error
if (typeof window === 'undefined') {
// some dummy element (div) to run prepass on
const element = createElement('div');
await ssrPrepass(element);
}