Function: useAmnesiaScopeOptional()
useAmnesiaScopeOptional(
scopeId?):Amnesia|null
Defined in: provider.tsx:213
Optional-provider analogue of useAmnesiaScope. Returns null when
no provider is mounted; use this when a reusable component should silently
degrade outside a provider.
With an explicit scopeId, pins to that scope and never re-renders on
active-scope changes. Without one, tracks the current active scope and
re-renders when it changes.
Parameters
| Parameter | Type |
|---|---|
scopeId? | string |
Returns
Amnesia | null