question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to Preact 10 gives 'Uncaught TypeError: Cannot create property 'current' on string 'element''

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
JoviDeCroockcommented, Dec 11, 2019

Yes, they have been deprecated

1reaction
peterswallowcommented, Dec 11, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found