Skip to content

Intermact API Reference / @intermact/core / applyPatch2D

Function: applyPatch2D()

applyPatch2D(state, changes): RuntimeState2D

Defined in: packages/core/src/runtime/state.ts:128

Apply an immutable patch, returning a new RuntimeState2D (structural sharing for unchanged branches). Order-independent merge of known fields.

Parameters

state

RuntimeState2D

changes

RuntimeState2DPatch

Returns

RuntimeState2D

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)