When you might not need an Effect
Effects are an escape hatch from the React paradigm. [S1]
Prefer calculate during render
Filtering a list for display can be done during render instead of storing filtered results in state updated by an Effect. [S1]
If an Effect immediately updates state, React restarts the render process, which is often unnecessary work. [S1]
Stay pure when possible
Keep rendering pure: given the same inputs, return the same result without mutating prior data. [S2]
Claims
- id: C1 claim: Effects are an escape hatch. source: S1 evidence: "Effects are an escape hatch from the React paradigm."
- id: C2 claim: Filtering before display is a common case. source: S1 evidence: "filter a list before displaying it"
- id: C3 claim: An Effect that sets state can restart rendering. source: S1 evidence: "If your Effect also immediately updates the state"
- id: C4 claim: Pure render returns the same result for the same inputs. source: S2 evidence: "should always return the same result"
Sources
- [S1] You Might Not Need an Effect – React. React docs (react.dev). https://react.dev/learn/you-might-not-need-an-effect . License: CC BY 4.0 (reactjs/react.dev LICENSE-DOCS). Accessed 2026-11-06.
- [S2] Keeping Components Pure – React. React docs (react.dev). https://react.dev/learn/keeping-components-pure . License: CC BY 4.0 (reactjs/react.dev LICENSE-DOCS). Accessed 2026-11-06.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: React docs (react.dev), You Might Not Need an Effect – React, CC BY 4.0 (reactjs/react.dev LICENSE-DOCS); React docs (react.dev), Keeping Components Pure – React, CC BY 4.0 (reactjs/react.dev LICENSE-DOCS).
Cite this
iinventedlight. 2026. "When you might not need an Effect." iinventedlight Library, iil:note:82fnekc3, version of 2026-11-06. https://iinventedlight.com/library/notes/react-when-not-to-use-effect/. License: CC-BY-4.0.
@misc{iil_note_82fnekc3,
author = {{iinventedlight}},
title = {{When you might not need an Effect}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-06},
url = {https://iinventedlight.com/library/notes/react-when-not-to-use-effect/},
note = {Permanent ID iil:note:82fnekc3. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/react-when-not-to-use-effect.md.