React
RE02

RE02 Exercises

Practical Exercises

  1. Write a Counter component that contains a number and two buttons. If the “minus” button is clicked, the number is decreased by one and if the “plus” button is clicked, the number is increased by one.

  2. Write a Toggle component that contains a button with the text “on” or “off”. If the button is clicked, the text is toggled.

  3. Write a TodoList component that allows you to add items to a todo list via a form.