Component Props and State

  1. Props:

    • Similar to arguments of a function
    • Are immutable once passed in
    • Can be passed down to children explicitely
  2. State:

    • Private data held within the Component
    • Can be updated using setState({someNew: 'data'})
    • Must be updated from the object that owns it
    • Can be passed down to children as Props
    • Can be updated by children by passing functions
[menu]

1/17