React Fundamentals

0% completed

Previous
Next
Code Challenge

Challenge: Create a Counter

Follow these instructions to complete your challenge:

  1. Create a functional component called Counter in the App.jsx file.
  2. Use the useReducer hook to manage a counter state.
  3. The counter should have three buttons: "Increment", "Decrement", and "Reset".
  4. When the user clicks Increment, the counter increases by 1.
  5. When the user clicks Decrement, the counter decreases by 1.
  6. Clicking Reset sets the counter back to 0.

.....

.....

.....

Like the course? Get enrolled and start learning!
Previous
Next