Tagged articles
4 articles
Page 1 of 1
KooFE Frontend Team
KooFE Frontend Team
Aug 11, 2021 · Frontend Development

How to Make React Effects Work Correctly in Strict Mode

This article explains how React's Strict Effects mode double‑invokes effects and layout effects during mount and unmount, and provides practical patterns using refs, cleanup functions, and focus management to ensure components behave correctly when effects run multiple times.

FocusReactRef
0 likes · 10 min read
How to Make React Effects Work Correctly in Strict Mode
KooFE Frontend Team
KooFE Frontend Team
Aug 9, 2021 · Frontend Development

Why React 18’s Strict Effects Matter and How to Use Them

React 18 extends StrictMode with Strict Effects, causing newly mounted components to run their effects twice in development to surface hidden bugs, while offering guidance on when to enable or disable this behavior for reliable UI state management.

ReactReact 18Strict Effects
0 likes · 6 min read
Why React 18’s Strict Effects Matter and How to Use Them