For AI agents: the complete documentation index is at llms.txt. Markdown versions are available by appending .md or sending Accept: text/markdown.
Reflex Logo
Docs Logo
Api Reference

/

State

State

reflex.state.State

The app Base State.

Fields

PropDescription
parent_state: Optional[BaseState] = None
substates: dict[str, BaseState] = {}
dirty_vars: set[str] = set()
dirty_substates: set[str] = set()
router_data: dict[str, Any] = {}
router: Field[RouterData] = RouterData
is_hydrated: bool = False

Methods

SignatureDescription
hydrate(*args: Any, **kwargs: Any) -> EventSpecAn event handler responds to an event to update the state. Attributes: fn: The function to call in response to the event. state: The state this EventHandler is directly attached to, if any.
set_is_hydrated(*args: Any, **kwargs: Any) -> EventSpecAn event handler responds to an event to update the state. Attributes: fn: The function to call in response to the event. state: The state this EventHandler is directly attached to, if any.
setvar(*args: Any) -> EventSpecA special event handler to wrap setvar functionality.
Built with Reflex