Controlled Components
A brief introduction to Controlled components and how it is different from uncontrolled components.
We'll cover the following...
The same law applies for the input field as applied for unidirectional data flows, which updates the local state with the searchTerm
to filter the list. When the state changes, the render()
method runs again and uses the recent searchTerm
from the local state to apply the filter condition.
But didn’t we forget something in the input element? An HTML input tag comes with a value
attribute. ...