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.

Uncaught TypeError: inst.setState.bind is not a function

See original GitHub issue

I’m getting this error when running npm start, however it goes away when i do npm run build and serve that. Any ideas? I’m not exactly sure what’s causing it, it’s related to setState though, from a result of a UI interaction callback. It doesn’t seem to cause problems… (famous last words).

Uncaught TypeError: inst.setState.bind is not a function
getData @ backend.js:8511
receiveComponent @ backend.js:8317
obj.(anonymous function) @ backend.js:8387
updateChildren @ ReactChildReconciler.js:110
_reconcilerUpdateChildren @ ReactMultiChild.js:210
_updateChildren @ ReactMultiChild.js:314
updateChildren @ ReactMultiChild.js:301
_updateDOMChildren @ ReactDOMComponent.js:941
updateComponent @ ReactDOMComponent.js:759
receiveComponent @ ReactDOMComponent.js:717
receiveComponent @ ReactReconciler.js:126
obj.(anonymous function) @ backend.js:8386
updateChildren @ ReactChildReconciler.js:110
_reconcilerUpdateChildren @ ReactMultiChild.js:210
_updateChildren @ ReactMultiChild.js:314
updateChildren @ ReactMultiChild.js:301
_updateDOMChildren @ ReactDOMComponent.js:941
updateComponent @ ReactDOMComponent.js:759
receiveComponent @ ReactDOMComponent.js:717
receiveComponent @ ReactReconciler.js:126
obj.(anonymous function) @ backend.js:8386
_updateRenderedComponent @ ReactCompositeComponent.js:761
_performComponentUpdate @ ReactCompositeComponent.js:739
updateComponent @ ReactCompositeComponent.js:658
receiveComponent @ ReactCompositeComponent.js:552
receiveComponent @ ReactReconciler.js:126
obj.(anonymous function) @ backend.js:8386
_updateRenderedComponent @ ReactCompositeComponent.js:761
_performComponentUpdate @ ReactCompositeComponent.js:739
updateComponent @ ReactCompositeComponent.js:658
receiveComponent @ ReactCompositeComponent.js:552
receiveComponent @ ReactReconciler.js:126
obj.(anonymous function) @ backend.js:8386
_updateRenderedComponent @ ReactCompositeComponent.js:761
_performComponentUpdate @ ReactCompositeComponent.js:739
updateComponent @ ReactCompositeComponent.js:658
performUpdateIfNecessary @ ReactCompositeComponent.js:566
performUpdateIfNecessary @ ReactReconciler.js:158
obj.(anonymous function) @ backend.js:8386
runBatchedUpdates @ ReactUpdates.js:151
perform @ Transaction.js:138
perform @ Transaction.js:138
perform @ ReactUpdates.js:90
flushBatchedUpdates @ ReactUpdates.js:173
closeAll @ Transaction.js:204
perform @ Transaction.js:151
batchedUpdates @ ReactDefaultBatchingStrategy.js:63
batchedUpdates @ ReactUpdates.js:98
dispatchEvent @ ReactEventListener.js:150

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tbillingtoncommented, Dec 8, 2016

@savovs It’s the react dev tools, not specifically related to create-react-app.

0reactions
gaearoncommented, Nov 19, 2017

I’ll lock this because the original bug is unrelated and now people googling this will read confusing threads that have nothing to do with their problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React this.setState is not a function - Stack Overflow
I suspect it's something wrong with this binding but I can't figure out how to fix it. Here's the code of my component:...
Read more >
React - How to fix this.setState is not a function error
Declare the class method using the arrow function syntax ; Bind the class method reference during constructor call or inside the calling property....
Read more >
Uncaught TypeError: this.setState is not a function - React ...
Since you're using ES2015 class syntax with React, this is not automatically bound to the method using it. See the No Autobinding section...
Read more >
[Solved]-React this.setState is not a function-Reactjs
This is mainly incompatibility problem between react, react-dom, and enzyme. Try install the following as I did to solve the problem: [...] "react":...
Read more >
React Error: "this.setstate is not a function" - How to Fix
As a reminder, we use this.setstate in React class components. If you're using functional components, you'll likely use the useState hook instead. You...
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 Hashnode Post

No results found