What Are React Hooks? State and Effects Without Classes
Hooks let function components hold state, run effects and subscribe to context, replacing class lifecycles with composable primitives. Includes a direct answer, a diagram and three quick self-checks.
Hooks let function components hold state, run effects and subscribe to context, replacing class lifecycles with composable primitives.
Hooks let function components hold state, run effects and subscribe to context, replacing class lifecycles with composable primitives. Everything below expands that one sentence into something you can actually use, in four short sections.
The core idea
The core idea fits in one move. useState stores per-component values across renders, and each render closes over its own snapshot. useEffect synchronizes with the outside world after render, and its dependency array controls re-runs.
Rules of hooks exist because React tracks hook order per component, so calls must be unconditional and stable. So far so clear, but the real skill shows up in the exceptions, which come next.
How it actually works
Next, the moving pieces. Strict mode double-invokes effects in development to surface impurity.
| Piece | What it means | Why it matters |
|---|---|---|
| render | one execution of your component function | it is what exams ask about |
| dependency array | the list deciding when effects re-run | it separates beginners from the fluent |
| custom hook | a reusable function composing built-in hooks | it is what exams ask about |
Where people get it wrong
The traps are few but well-worn. No; order stability is the mechanism React relies on. The remaining piece is the practical one, and it comes next.
| Common belief | The accurate version |
|---|---|
| Why does my effect run twice? | Strict mode double-invokes effects in development to surface impurity. |
| When do I need useCallback? | When identity stability matters to memoized children or effect deps. |
Quick answers
Three quick answers, each one worth retrieving before you peek.
Why does my effect run twice?Pause to think. Then press enter to reveal.
Answer:Strict mode double-invokes effects in development to surface impurity.
Can hooks be conditional?Pause to think. Then press enter to reveal.
Answer:No; order stability is the mechanism React relies on.
When do I need useCallback?Pause to think. Then press enter to reveal.
Answer:When identity stability matters to memoized children or effect deps.
Drop the PDF in, get a 3D map of its ideas, and quiz the red nodes until they turn green.
Open Brain — freeKey terms
- render
- one execution of your component function
- dependency array
- the list deciding when effects re-run
- custom hook
- a reusable function composing built-in hooks
one execution of your component function
the list deciding when effects re-run
a reusable function composing built-in hooks
Write the direct answer in your own words before reading further.
If a term above still feels foggy, that is your next study target.
Testing yourself once now beats rereading this page three times later.
The fastest learners treat confusion as a map, not a verdict.
Small daily reviews compound into knowledge that survives the exam.
Explain one piece of this to someone else and watch the gaps surface.
Your notes should carry questions, not just answers.
The goal tonight is one honest attempt, not a perfect one.
A study method only counts when it survives contact with a real exam week.
Understanding arrives in layers, and the second layer is usually where marks are won.
Practice makes permanent, so practice the version of the habit you want to keep.
When in doubt, return to the direct answer at the top of this page.
Reading about a method changes nothing; running it for one week changes plenty.
The term render appears throughout this page on purpose; repetition here is structure, not padding.
Notice how the direct answer, the table and the quick answers all point at dependency array.
Tonight, convert one class component to hooks and compare the code side by side, because the shape difference teaches instantly.
Cite this guide
Brain — try4ever. (2026, November 30). What Are React Hooks? State and Effects Without Classes. Brain Blog, try4ever.com. Retrieved November 30, 2026, from https://www.try4ever.com/blog/what-are-react-hooks/"What Are React Hooks? State and Effects Without Classes." Brain Blog, try4ever, 30 Nov. 2026, www.try4ever.com/blog/what-are-react-hooks/. Accessed 30 Nov. 2026.Brain — try4ever. "What Are React Hooks? State and Effects Without Classes." Brain Blog, try4ever.com, November 30, 2026. https://www.try4ever.com/blog/what-are-react-hooks/.@misc{brain2026what-are-react-hooks,
author = {{Brain — try4ever}},
title = {What Are React Hooks? State and Effects Without Classes},
year = {2026},
howpublished = {\url{https://www.try4ever.com/blog/what-are-react-hooks/}},
note = {Brain Blog, try4ever.com; published 2026-11-30}
}Link to this guide
<a href="https://www.try4ever.com/blog/what-are-react-hooks/">What Are React Hooks? State and Effects Without Classes</a> — Brain, try4ever.com[What Are React Hooks? State and Effects Without Classes](https://www.try4ever.com/blog/what-are-react-hooks/) — Brain, try4ever.comReproducing a paragraph elsewhere? Keep the source line that appears when you copy it — that citation is what search engines and AI assistants credit back to this page.