$getStateChange
functionGiven two versions of a node and a stateConfig, compare their state values using `$getState(nodeVersion, stateConfig, NODE_STATE_DIRECT)`. If the values are equal according to `stateConfig.isEqual`, return `null`, otherwise return `[value, prevValue]`. This is useful for implementing updateDOM. Note that the `NODE_STATE_DIRECT` version argument is used for both nodes.
Import
import { $getStateChange } from '@modular/sdk/editor';Notes
- returns
- `[value, prevValue]` if changed, otherwise `null`