B
B
Boris Manzhela2020-01-27 21:28:15
React
Boris Manzhela, 2020-01-27 21:28:15

Why doesn't setState work inside the component?

Hello! When entering any characters into the text field, the console complains about Uncaught TypeError: Cannot read property 'setState' of undefined . Environment - React 16.12

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-01-27
@EKCTPEMICT

onChange={this.handleSearch.bind(this)}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question