Function: refreshContextSubtree()
API / @xmachines/play-actor / refreshContextSubtree
function refreshContextSubtree(store, view): void;Defined in: packages/play-actor/src/context-projection.ts:210
Refreshes the /context subtree of a live store from the composed state of a
derived view. An emission with the same viewKey means that only the projection
changed. The function therefore replaces the complete subtree, and it never
merges it field by field, because update cannot delete a key. Every ephemeral
value at the root level stays. The function does nothing when the view carries no
slice, or when the store holds the slice already.
Parameters
| Parameter | Type | Description |
|---|---|---|
store | StateStore | The store WITHOUT the guard. A provider refreshes through it. |
view | { state?: unknown; } | The derived view. Its state.context field carries the slice. |
view.state? | unknown | - |
Returns
void