Statemanager
reflex.istate.manager.StateManagerA class to manage many client states.
Fields
| Prop | Description |
|---|---|
state: type | The state class to use. |
Methods
| Signature | Description |
|---|---|
create(cls, state: type[reflex.state.BaseState]) | Create a new state manager. |
get_state(self, token: str) -> reflex.state.BaseState | Get the state for a token. |
set_state(self, token: str, state: reflex.state.BaseState, **context: Unpack[reflex.istate.manager.StateModificationContext]) | Set the state for a token. |
modify_state(self, token: str, **context: Unpack[reflex.istate.manager.StateModificationContext]) -> collections.abc.AsyncIterator[reflex.state.BaseState] | Modify the state for a token while holding exclusive lock. |
close(self) | Close the state manager. |