Events

Transient, addressed the same way as store paths, and deliberately a different mechanism.

events.emit('@/agent/restart', { id: 'billing' });
events.on('@/agent/restart', (payload) => {});
events.on('@/agent', handler, { subtree: true });
await events.next('@/dialog/confirm', 5000);

An event has no value to read back. If something needs to be read later, it is state and belongs in the store.


Back to top

MIT licensed. Pre-1.0 - the surface is still moving.