preact X type error
See original GitHub issueI’m getting undefined is not an object (evaluating 'h.__H')
after building with rc3,
o (bundle.269f6.js:1:8826)
i (bundle.269f6.js:1:8957)
O (bundle.269f6.js:1:8604)
O (bundle.269f6.js:1:16581)
w (bundle.269f6.js:1:16048)
k (bundle.269f6.js:1:17676)
_ (bundle.269f6.js:1:13235)
u (bundle.269f6.js:1:19075)
pwNi (bundle.269f6.js:1:19106)
e (bundle.269f6.js:1:106)
(anonymous function) (bundle.269f6.js:1:1351)
Global Code (bundle.269f6.js:1:1364)
what am I overlooking?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
What's new in Preact X
New features and changes in Preact X. ... This can be used to display user-friendly error messages, or write a log entry to...
Read more >TypeScript | Preact: Fast 3kb React alternative with the same ...
Preact's Component class is typed as a generic with two generic type variables: Props and State. Both types default to the empty object,...
Read more >Debugging Preact Apps
Preact will throw this error whenever you pass undefined instead of a component. The common cause for this one is mixing up default...
Read more >Upgrading from Preact 8.x
This document is intended to guide you through upgrading an existing Preact 8.x application to Preact X and is divided in 3 main...
Read more >Differences to React - Preact
x when discussing compatibility or making comparisons. Debug messages and errors. Our flexible architecture allows addons to enhance the Preact experience in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I look at the output of your bundle it’s pointing to different bundles of Preact (Preact seems to be bundled in multiple times)
Adding:
To your webpack.config.js does not only reduce bundle size it also removes the error, note that a setup like this would fail with any framework.
@developit I checked an there definitely are no copies of Preact 8 in node_modules.
I’ve created a repo that reproduces the issue https://github.com/maltium/repro-preact-hook