Function: useAmnesia()
useAmnesia(
scopeId?):UseAmnesiaResult
Defined in: use.ts:63
Subscribe to the Amnesia store and receive both state and actions.
useAmnesia()(no arg) — tracks the currently active scope and re-renders both when its state changes and when the active scope id itself changes (via focus claims). Use this when the component should reflect "whatever the user is editing right now."useAmnesia("canvas")— pins to a specific scope. Re-renders only on that scope's state changes. Use this when the component is logically tied to a specific surface (a canvas toolbar, a property-panel breadcrumb, etc.).
Must be called inside an AmnesiaProvider.
Parameters
| Parameter | Type |
|---|---|
scopeId? | string |