Manuals / React Basics / Chapter 3

Core · intermediate · ~45 min · Chapter 3 of 4

Effects & fetching

useEffect for syncing with the outside world — carefully.

Path progress
63%

Step 1 of 2

Key idea

Effects run after paint to talk to APIs, subscriptions, or the DOM. Dependency arrays decide when they re-run.

Key ideaDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Key ideadrag · tap →Go deeperdrag · tap →Follow the dashed drag · tap →

Quick check

Empty dependency array means…

Do this now

Write 3 notes on: Effects.

Was this step clear?
Chapter learning outcomes
  • useEffect
  • Dependency arrays
  • Cleanup

Clear these before you leave