Statemanager
reflex.istate.manager.StateManagerA class to manage many client states.
Methods
| Signature | Description |
|---|---|
create(cls) | Create a new state manager. |
get_state(self, token: Union[reflex.istate.manager.token.StateToken[~TOKEN_TYPE], str]) -> ~TOKEN_TYPE | Get the state for a token. |
set_state(self, token: Union[reflex.istate.manager.token.StateToken[~TOKEN_TYPE], str], state: ~TOKEN_TYPE, **context: Unpack[reflex.istate.manager.StateModificationContext]) | Set the state for a token. |
modify_state(self, token: Union[reflex.istate.manager.token.StateToken[~TOKEN_TYPE], str], **context: Unpack[reflex.istate.manager.StateModificationContext]) -> collections.abc.AsyncIterator[~TOKEN_TYPE] | Modify the state for a token while holding exclusive lock. |
modify_state_with_links(self, token: Union[reflex.istate.manager.token.StateToken[~TOKEN_TYPE], str], previous_dirty_vars: dict[str, set[str]] | None = None, **context: Unpack[reflex.istate.manager.StateModificationContext]) -> collections.abc.AsyncIterator[~TOKEN_TYPE] | Modify the state for a token, including linked substates, while holding exclusive lock. |
close(self) | Close the state manager. |