Interactive props

"Right. It also says that value is a prop. Similar to value, there are some other props supported by the input fields." said Mike.

  • value
  • defaultValue
  • onChange

"As React has warned us that we need to either provide the defaultValue or onChange prop to make this field mutable, let's take care of this and add a onChange handler. The field is read-only because by setting the value prop, we have rendered a controlled component." explained Mike.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset