Skip to content

Interface: ViewStoreLifecycle

API / @xmachines/play-view / index / ViewStoreLifecycle

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

Methods

renew()

renew(): void;

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

Gives the next resolution a new generation, and keeps the store. A provider keys its subtree on the generation, so the next resolution mounts a new subtree with the same state. The view session calls it after a failure of the root: the root boundary of json-render stays failed while its subtree stays mounted.

Returns

void


reset()

reset(): void;

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

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-view/src/view-store-lifecycle.ts:111

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