Skip to content
Advertisement

React change input value onChange

This is my SearchForm.js, handleKeywordsChange must handle input keywords changes

JavaScript

The problem is input keywords doesn’t change its value when I’m typing. What’s wrong?

Advertisement

Answer

Make a common function for changing the state for input values.

JavaScript

Make sure you mention name in every input tag. e.g:

JavaScript
Advertisement