Saga Holm logo

Barış sezer

Work with me

All journal notes

React

·

Why I stopped reaching for useEffect

Most of my effects were syncing state that never needed to be state. Here’s what I do instead.

Last year I audited a React codebase with over 300 useEffect calls. Most of them were copying one piece of state into another, and half of the bugs we fixed came from exactly that.

If a value can be calculated during render, it doesn’t belong in state. If something happens because a user clicked, it belongs in the event handler, not in an effect.

Now I reach for derived values, event handlers and libraries like TanStack Query first. My components got shorter, and a whole class of bugs simply disappeared.

Barış Sezer

Building something that needs this kind of engineering? I’d love to hear about it.

Have a project in mind?

Tell me what you’re building — I reply within two working days, no pitch and no obligation.

Based in Moscow

Local time

 

Letters

Occasional notes on new projects and what I’m learning.

© 2026 Barış Sezer

Made in Moscow