There's a faster version of egghead. Click here to try it.
1×
Become a member
to unlock all features
Autoplay

    Implement Component State Reducers

    reactReact
    ^16.3.2

    Often with reusable components, the logic needs to be adjusted to handle various use cases. Rather than filling our component event handlers with if statements and loading our state with one-off properties, we can expose our state directly to users of our reusable component in a way that's flexible and simple with a state reducer.