Unidirectional and bidirectional data flow

One-way and two-way data binding

Unidirectional (one-way) data flow

  • You pass data down from parent to child component
  • You can't update parent's state from a child
    • Instead, you handle events dispatched by a child to update the state
  • Parent -> Child

Bidirectional (two-way) data flow

  • Parent and child components share the data
    • Change to model updates the view
    • Change to view updates the model
  • Parent <-> Child

Resources