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: this.setState is not a function

See original GitHub issue

I get: Uncaught TypeError: this.setState is not a function in my browser console when typing,

I think it’s referencing the evt as this.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
codeslayer1commented, Apr 11, 2018

This does not seem to be an error with the component. Looks like in your onChange method, you do not have access to this. You must bind this to your onChange function. To do this, add this line in your constructor.

this.onChange = this.onChange.bind(this);

See if this helps.

0reactions
Abhinash1994commented, Apr 7, 2019

I get: simple problem but i don’t know how can i solve it. when i will submit the ckeditor then i got with html tag the my content .

like

what’s up?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React this.setState is not a function - Stack Overflow
trying to write an app working with an API. I keep getting this error: TypeError: this.
Read more >
React - How to fix this.setState is not a function error
Fixing this.setState error with arrow function syntax ... To avoid the this keyword context from being replaced by the function, you can declare ......
Read more >
React Error: "this.setstate is not a function" - How to Fix
“this.setstate is not a function” is a common error message that comes up in React. In this article, we'll learn how to fix...
Read more >
How to fix - this.setState is not a function error in React
The reason why this error occurs is because of a concept called Closures in JavaScript. That means the scope/context of the function ......
Read more >
React - setState is not a function - debuggr.io
Component 's setState method. unfortunately, this won't work well. When the user click the button we will get an error: TypeError: this.setState ......
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