createState
functionCreate a StateConfig for the given string key and StateValueConfig. The key must be locally unique. In dev you will get a key collision error when you use two separate StateConfig on the same node with the same key. The returned StateConfig value should be used with $getState and $setState.
Import
import { createState } from '@modular/sdk/editor';Notes
- returns
- a StateConfig
- __NO_SIDE_EFFECTS__