← All notes

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

Sources

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

Permanent ID: iil:note:82fnekc3

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.},
}

Markdown

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.