Skip to content

ihollander/workshop-use-effect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Side Effects and Data Fetching

Setup

Clone and download this repo, and run npm install. Then:

  • Run npm test to run tests in one terminal tab
  • Open another terminal tab, and run npm start to run the project in the browser

In the tab that is running tests, you can press the p key to select a specific test file to run. For example, hitting p and then typing 01.js will run the first test.

Instructions

The src directory has two folders: one for the solution code, and one for the exercises. You'll be working in the exercise folder.

  • src/exercise/01.js: Exercise (write your code here)
  • src/exercise/01.md: Deliverables and helpful notes
  • src/__tests__/01.js: Exercise test
  • src/__tests__/01.extra-1.js: Test for extra credit exercise
  • src/solution/01.js: Solution code (check your work, or look for a hint if you're stuck)
  • src/solution/01.extra-1.js: Solution code for extra credit exercise

Each deliverable in the exercise folder has comments to guide your work!

There are some emoji to guide you in the exercises:

  • ✅ Instructions where to write your code
  • 👀 A hint on what syntax to use/what code to write
  • 📃 Helpful documentation

All credit to Kent C Dodds for the emoji guide idea, and general inspiration for this workshop format!

When running the workshop app in the browser, you can see the readme for each exercise alongside a sandbox where you can view your exercise code to see if it works. You can also open up your exercise code in a new browser tab to view the exercise alone, and more easily see what's happening in the React Dev Tools.

You can also view working examples of the code in the browser by clicking the solution tab.

Some exercises have bonus challenges to do for extra credit, so if you finish early, give them a shot! Or save them for later when you want to revisit these exercises.

About

React useEffect Workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published