MCPcopy
hub / github.com/reflex-dev/reflex / _get_root_state

Method _get_root_state

reflex/state.py:1655–1664  ·  view source on GitHub ↗

Get the root state of the state tree. Returns: The root state of the state tree.

(self)

Source from the content-addressed store, hash-verified

1653 })
1654
1655 def _get_root_state(self) -> BaseState:
1656 """Get the root state of the state tree.
1657
1658 Returns:
1659 The root state of the state tree.
1660 """
1661 parent_state = self
1662 while parent_state.parent_state is not None:
1663 parent_state = parent_state.parent_state
1664 return parent_state
1665
1666 async def _get_state_from_redis(self, state_cls: type[T_STATE]) -> T_STATE:
1667 """Get a state instance from redis.

Callers 8

_get_state_from_cacheMethod · 0.95
get_var_valueMethod · 0.95
_execute_eventMethod · 0.80
_patch_stateFunction · 0.80
_rehydrateMethod · 0.80
_resolve_linked_stateMethod · 0.80
__aexit__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected