-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error: Cancel rendering route
and TypeError: Cannot read properties of null (reading '__H')
when using Next.js Router
#3512
Comments
Error: Cancel rendering route
and TypeError: Cannot read properties of null (reading '__H')
when using Next.js Router
This might be a Next.JS thing, we have already had a few issues that were mentioned in #3393 that is on their side with regards to duplicated Preact bundles etc. Generally however, we advise to replace |
Thanks! I just remembered that I used to do it that way, but then I encountered the same problem as preactjs/next-plugin-preact#53. It's fixed if
|
Any progress on that? |
Describe the bug
Using the latest Preact (10.7.1) and Next.js (12.1.4) and React 18 installed, changing the route (e.g. calling
Router.replace
,Router.push
) will throw three errors:Next.js requires React to be installed (otherwise the server won't start), that's why I have it installed. With React 17, it works fine.
To Reproduce
Link: https://codesandbox.io/s/dank-frost-eeb42x
Also on GitHub: https://github.com/laymonage/repro-preact-nextjs-router-issue
Steps to reproduce the behavior:
Expected behavior
No errors
Notes
I don't know if this issue should be fixed in Next.js or Preact.
Possibly related: #3393, #3261
The text was updated successfully, but these errors were encountered: