useEffectEvent creates event-like logic called from an effect. It reads the latest props and state without becoming an effect dependency.
The demo changes the notification theme while the chat connection stays alive. It is not a blanket workaround for lint warnings and must be declared alongside its effect in the same component or hook.
When to use
Use it when a connection should persist but its event handler must read current theme or settings.