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.

Does not work with React 16

See original GitHub issue

This package breaks any app using it once updated to React 16


ReactBaseClasses.js:66 Uncaught TypeError: this.updater.enqueueCallback is not a function
    at ReactTooltip.ReactComponent.setState (ReactBaseClasses.js:66)
    at resetState (index.js:436)
    at ReactTooltip.hideTooltip (index.js:448)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:9

github_iconTop GitHub Comments

1reaction
bradennapiercommented, Oct 4, 2017

No, it wasnt react-tooltip that was the problem, if ANY of your dependencies or their dependencies have react as a dependency rather than peerDependency then any calls that utilize enqueue callback

this.setState({
    foo: 'bar'
}, () => console.log('set!'))

will generate this error.

if you run the

yarn list 

or

npm ls 

on your app you should see a package that has react as a dependency – that package needs to move it to peerDependencies or you need to remove that package. Even if you do not use that package and it is never imported - it appears to cause a conflict.

1reaction
bradennapiercommented, Oct 3, 2017

Hey @emily-plummer this happens when you have two versions of React installed. This was due to a repo which I was not even including but since it was in my package.json it was causing an issue.

yarn list

revealed that repo easily and upon removing it this problem instantly resolved. So it was not an issue with react-tooltip at all.

That being said, I will leave this open for a little while so others can see it -s ince we have 7 thumbs up already I would assume quite a few are running into this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to use React 16 library in react 17 - Stack Overflow
I have checked related questions, still haven't found any working solution. It works fine in react 16. To reproduce - I have been...
Read more >
React v16.0 – React Blog
React 16 includes a number of small breaking changes. These only affect uncommon use cases and we don't expect them to break most...
Read more >
Does not work with React 17 - Readme implies works for 16+ ...
I have a react17 project. Installation results in peerDependency error. The latest version (v13.3.0)'s package.json contains "react": ...
Read more >
Issues and side effects with Reactive Web and Mobile apps on ...
OutSystems uses React 16 as the default React version for the app runtime for Platform Server 11.12.0 and higher.
Read more >
Upgrading to React 17 - Medium
All code which does not have any kind of dependency on React goes here. ... In React 16, the cleanup function timing in...
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