Controlled Components

Eric Njanga Dec 21, 2017

Let’s look at a controlled component as a tool in another component’s hand. Such a component have no “state” on its own and exists solely for the purpose of facilitating the application’s flow, for instance:

  • A component which receives its value from a parent and informs this parent when a specific event happens
  • A form component whose submission is controlled by a parent
  • An input text, text-area or select components whose values are controlled by parent components

Source:  React forms

© 2018 Copyright Eric Njanga | |