You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StateStorage keeps state data, updates state when underlying storage updates. Objects in application can be stateful. StateStorage is basic structure that implements persistent state (won't go away on app restart).
Key for constructor below is already existing new StateKey(...).toString() - something that identifies particular command for particular user for particular platform.
StateStorage implementation:
constructor(key) - Constructor. key - state key, for example telegram_31337_4566bd48-d369-4594-aa1e-fb5dae1acf43. load() - Loads state from the actual storage. Returns promise which is executed when changes were initially loaded. save() - updates the storage with current state, returns promise. Will only overwrite the children enumerated in state. setState({ ... }) - updates selected properties. state - actual state. dispose - unsubscribes itself from storage updates (off method for Firebase).
StateStorage keeps state data, updates state when underlying storage updates. Objects in application can be stateful. StateStorage is basic structure that implements persistent state (won't go away on app restart).
Key for constructor below is already existing
new StateKey(...).toString()
- something that identifies particular command for particular user for particular platform.StateStorage implementation:
constructor(key)
- Constructor.key
- state key, for exampletelegram_31337_4566bd48-d369-4594-aa1e-fb5dae1acf43
.load()
- Loads state from the actual storage. Returns promise which is executed when changes were initially loaded.save()
- updates the storage with current state, returns promise. Will only overwrite the children enumerated instate
.setState({ ... })
- updates selected properties.state
- actual state.dispose
- unsubscribes itself from storage updates (off
method for Firebase).Usage example:
The text was updated successfully, but these errors were encountered: