Upgrade to Preact 10 gives 'Uncaught TypeError: Cannot create property 'current' on string 'element''
See original GitHub issueI just upgraded from Preact 8 to Preact 10 and I’m getting this error when I run it in the browser.
preact.module.js:1 Uncaught TypeError: Cannot create property 'current' on string 'element'
at A (preact.module.js:1)
at b (preact.module.js:1)
at $ (preact.module.js:1)
at preact.module.js:1
at x (preact.module.js:1)
at x (preact.module.js:1)
at b (preact.module.js:1)
at $ (preact.module.js:1)
at preact.module.js:1
at x (preact.module.js:1)`
Any idea what this error means? i’m aliasing from ‘react’ to ‘preact/compat’ and everything worked fine before I upgraded. I’ll try upgrading to the latest version of Preact to see if that helps.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot create property 'value' on string
This error occurs because the setState function is not being handled properly here. Unlike the setState method found in class components, ...
Read more >Switching to Preact (from React)
The preact-compat package provides all the necessary tweaks on top of Preact's core to make it work just like react and react-dom ,...
Read more >cannot read properties of undefined usestate - You.com
Just update setTeam like following, your error will be resolved. setTeam(data.sports);.
Read more >ReferenceError: Buffer is not defined engine.io Code Example
(window as any).global = window;. 2. // @ts-ignore. 3. window.Buffer = window.Buffer || require('buffer').Buffer;. Source: github.com. Add a Grepper Answer ...
Read more >React loop through nested object - Seba Online
Keys for the objects and map() for the arrays but I can't seem to get ... typescript remove an item 2) Create a...
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
Yes, they have been deprecated
The deprecation is not mentioned in the upgrade guide nor CreateRef documentation https://preactjs.com/guide/v10/upgrade-guide/ https://preactjs.com/guide/v10/refs/#createref
I’ll try to add something to the upgrade-guide later