State management library
All functions that are related to state management
State as a singleton can be accessed anywhere in the application by a simple require, making it very simple to check the current state. State should be the ONLY mutated object in the app. Its properties will be replaced by updated ones over and over again during the app lifecycle, ensuring that all functions remain pure.
- Source:
Methods
(static) get(path) → {Any}
State setter
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | Path to retrieve |
- Source:
Returns:
Value located at path in this module
- Type
- Any
(static) set(path, value) → {Object}
State getter
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | Path to create/update |
value |
Any | Value to create/update |
- Source:
Returns:
This module with given value set at given path
- Type
- Object