Using the Reducer in a React Component
Learn how to use a reducer to add actions to the application components.
Adding a Counter
component
So far, we’ve talked much about the reducer pattern outside any framework. Let’s pull our counterReducer
into React and see how it works. We’ll start with this simple component:
Get hands-on with 1300+ tech skills courses.