Frontend with React
🔄 useEffect, useRef and effects
Side effects with useEffect (deps and cleanup), the data-fetching pattern, and useRef for the DOM and mutable values.
What you'll learn
- Run side effects with
useEffectand control when they re-run with the dependency array - Free resources (timers, subscriptions) by returning a cleanup function
- Fetch data from an API applying the
loading/error/datapattern - Store the DOM or mutable values that persist without re-rendering with
useRef
Lessons
useEffect: side effectsSynchronizing the component with the outside world. Fetching data with useEffectThe loading / error / data pattern. useRef: DOM and mutable valuesA box that persists without re-rendering.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →