New edits.
Unchanged history.
Start a real dedicated worker. Headphones start with 12 units in stock. Mark them as sold out, then compare the live catalog with the worker's retained snapshot.
Setup normally runs automatically. This host may need one page refresh to enable shared memory. If your browser blocks service workers or isolation, open this page in a full browser or use a host with COOP/COEP headers. Documentation stays available; there is no copy-mode fallback.
Current state
Not loaded
state.current.stock.get('headphones')Updates synchronously.
Latest snapshot
Not loaded
shared.current.stock.get('headphones')Receives new roots asynchronously.
First snapshot
Not loaded
initial.stock.get('headphones')Stays unchanged after later edits.
- Ready. No worker is running yet.
What to notice
The owner changes first. The worker sees the new value after a snapshot arrives. Its first snapshot still shows 12 units in stock, even when the current value is zero.
Each collection read happens locally, outside any task. The worker sends small reports only so this page can display the results.
Build this into your app →This uses the real source build shipped with this site. Disconnect releases the session and terminates this worker. Browser page navigation also ends the demo. This is a local catalog view, not stock reservation; checkout still needs server validation.