Skip to content

Interface: ViewStoreLifecycle

API / @xmachines/play-actor / ViewStoreLifecycle

Defined in: packages/play-actor/src/view-store-lifecycle.ts:67

Methods

reset()

reset(): void;

Defined in: packages/play-actor/src/view-store-lifecycle.ts:84

Drops everything, on an unmount or a disconnect. The next resolve makes a new seed.

Returns

void


resolve()

resolve(
actor,
view,
externalStore?,
options?): ViewStoreResolution;

Defined in: packages/play-actor/src/view-store-lifecycle.ts:77

Brings the store in line with an emission, and returns it with its guard.

Parameters

ParameterTypeDescription
actorunknownThe actor of the emission. A different actor drops the store that the code kept.
viewPlaySpecThe derived view. It is not null: a null emission is a GAP, and not a new view. A caller resolves nothing on a null value, and it keeps the store.
externalStore?StateStoreThe controlled mode: the store of the caller.
options?ResolveViewStoreOptionsSee ResolveViewStoreOptions.

Returns

ViewStoreResolution