Demo: Stale In-Memory State

Tab ID:

Each tab has its own React state. The server is the source of truth.
When one tab changes the server, other tabs don't know.

Notifications:
OFF
React state: OFF
Server: OFF
How to trigger the bug
  1. Open this page in two browser tabs (Tab A and Tab B)
  2. In Tab A, toggle notifications ON
  3. Both tabs now show ON and receive notifications every 4 seconds
  4. In Tab A, toggle notifications OFF
  5. Tab B still shows ON — its React state is stale!
  6. Server stopped sending notifications, but Tab B's UI is wrong

SSE: ○ Disconnected