React.StrictMode trong development gọi một số lifecycle methods và hooks hai lần (mount, unmount, re-mount) để phát hiện side effects không thuần. componentDidMount và componentDidUpdate được gọi hai lần trong dev, nhưng một lần trong production.
Hữu ích để catch bugs do side effects trong render phase.
In development, React.StrictMode intentionally calls certain lifecycle methods and hooks twice (mount → unmount → remount) to detect impure side effects. componentDidMount and componentDidUpdate run twice in dev but only once in production.
This helps catch bugs caused by side effects leaking into the render phase.