ts
import { SessionResource } from '@trail-run/core/reactive/storage-resource';Function: SessionResource()
ts
function SessionResource(id): ClassDecorator;Defined in: src/reactive/storage-resource.ts:46
Decorator which transforms a class into a StorageResource persisted in sessionStorage.
SessionResources must either be singletons or expect all instances to share state unless a primary key function is provided.
When a primary key function is provided, each instance will have its own persisted data based on the key generated by the function.
The function will be called once per instance during initialization to determine the unique ID for that instance.
Parameters
id
string | KeyFn
Returns
ClassDecorator