Explain a stale closure in useEffect or an event handler.

A websocket handler registered once will log the user from mount unless I re-subscribe when user changes, or I store user in a ref and read ref.current in...

Explain a stale closure in useEffect or an event handler. · Home · Support the platform