createStore
Edit this pageStores were intentionally designed to manage data structures like objects and arrays but are capable of handling other data types, such as strings and numbers.
Types Signature
Usage
Getter
Store objects support the use of getters to store derived values.
Setter
Changes can take the form of function that passes previous state and returns new state or a value.
Objects are always shallowly merged. Set values to undefined to delete them from the Store.
In TypeScript, you can delete a value by using a non-null assertion, like undefined!
.
To learn more about using stores check the Stores Guide, and the Store utilities section for more advanced APIs.