Uncaught TypeError: inst.setState.bind is not a function
See original GitHub issueI’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:
- Created 7 years ago
- Comments:16 (5 by maintainers)
Top 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 >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 Hashnode Post
No results found
Top GitHub Comments
@savovs It’s the react dev tools, not specifically related to create-react-app.
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.