Dev Tools · 1h ago
React useUpdateEffect Hook Skips First Render Cleanly
The useUpdateEffect hook from @reactuses/core runs useEffect callbacks only on updates, not on mount. It eliminates boilerplate ref guards that developers often copy-paste across components. The hook is four lines long and TypeScript-first, but leaks in React 18 StrictMode where the mount callback fires in development.
Meridian48 take
A tiny utility that solves a real pain point, but the StrictMode caveat means teams should test carefully before adopting it widely.
reacthooks