useEffect in production: stale closures, cleanup and effects running at the wrong time
An old subscription updates a new view; a background refresh erases a draft. Define Effect ownership, dependencies and cleanup, then test callbacks and timers without network timing.
By Damian Ostraszewski

