-
-
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
TypeError: Cannot read properties of null (reading '__H') after Preact update #3393
Comments
Are you calling We'll need a reproduction however if it's the former. |
@JoviDeCroock it does seem to be the case of Preact being bundled twice, once for each library, but for some reason earlier versions didn't crash. So I'm closing this, thanks. |
also having this issue. looks like it’s trying to read at this line in the un-minified source: https://github.com/preactjs/preact/blob/10.10.3/hooks/src/index.js#L135 @JoviDeCroock what did you mean by:
what |
Your bundler might be duplicating the |
And what should we do to stop this double bundle? |
@tombohub That depends entirely upon your tooling and environment. |
in my case, i had to switch from class component to functional component to get rid of this error |
You were probably misusing classes in some way, but would need a reproduction to offer any more guidance than that. |
We have a project that uses Preact that was mostly written when 10.0.0 was released. After updating to the latest Preact version, I'm getting a runtime error when mounting certain components.
After some digging I realized that this is happening upon mounting components that use hooks. Moreover, I performed a bisect on Preact version dependencies and found out that it starts to break from Preact 10.5.6 upwards (all other previous versions are fine).
To Reproduce
Unfortunately it's hard to isolate into a smaller project since the Preact part is only a small part of the whole project.
For now I've converted the affected components into class components and got things working again on the latest Preact.
The text was updated successfully, but these errors were encountered: