Side Effects in useEffect
Concept Check Medium
Question
Which of these should be done in useEffect (not during render)?
Hint
Side effects reach outside the component.
Explanation
Fetching data is a side effect — it reaches outside the component and should be in useEffect. Computing derived values, rendering lists, and conditional rendering are all pure operations that belong in the render body, not in effects.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.