Reflex Logo

Intro

Gallery

Hosting

Learn

Components

API Reference

Onboarding

Api-reference

/

Statemanager

reflex.state.StateManager

A class to manage many client states.

PropDescription
state: Type

The state class to use.

SignatureDescription
create(cls, state: 'Type[BaseState]')Create a new state manager.
get_state(self, token: 'str') -> 'BaseState'Get the state for a token.
set_state(self, token: 'str', state: 'BaseState')Set the state for a token.
modify_state(self, token: 'str') -> 'AsyncIterator[BaseState]'Modify the state for a token while holding exclusive lock.

Did you find this useful?

HomeGalleryChangelogIntroductionHosting