Exercises: React - useEffect hook

This repository contains 4 exercises to train the useEffect hook from React.

The repository contains 5 branches:

  • main: just for this README and general resources And 4 branches, 1 per exercise:
  • 1-use-effect-basics
  • 2-window-resize
  • 3-counter-local-storage
  • 4-using-external-api

Using the template

Use the template feature from GitHub to create a new repository under your profile.

Make sure you tick the checkbox "Include all branches"

Once you are set, you can clone your newly created repository and proceed.

How to use it?

This project has been generated with create-react-app.

To install all the dependencies of the project before we start working, we run:

npm install or npm i

Once we are set, we have to run

npm start

to start the development server.

Doing the exercises

Now that we have our project setup, all dependencies installed and the development server running, we can just switch between branches. Each branch has its own README.md explaining what you need to achieve in the exercise. Just switch to a branch, work on the exercise, commit your changes to that branch and when you are done, you can switch to the next exercise.

Resources