An effect re-runs based on its dependencies, and getting that array wrong is the #1 source of React bugs.
Pitfall 1: missing dependencies → stale values
An effect closes over the values from the render it was created in. If you omit a dependency, it keeps using an old one:
( {
id = ( {
.(count);
}, );
(id);
}, []);
