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

Method get_root_state

reflex/state.py:1043–1050  ·  view source on GitHub ↗

Get the root state. Returns: The root state.

(cls)

Source from the content-addressed store, hash-verified

1041 @classmethod
1042 @functools.lru_cache
1043 def get_root_state(cls) -> type[BaseState]:
1044 """Get the root state.
1045
1046 Returns:
1047 The root state.
1048 """
1049 parent_state = cls.get_parent_state()
1050 return cls if parent_state is None else parent_state.get_root_state()
1051
1052 @classmethod
1053 def get_substates(cls) -> set[type[BaseState]]:

Callers 14

add_dependencyMethod · 0.80
test_mixin_stateFunction · 0.80
test_child_mixin_stateFunction · 0.80
test_bare_mixin_stateFunction · 0.80
reload_state_moduleFunction · 0.80
_modify_linked_statesMethod · 0.80
__init_subclass__Method · 0.80
get_stateMethod · 0.80

Calls 1

get_parent_stateMethod · 0.80

Tested by 4

test_mixin_stateFunction · 0.64
test_child_mixin_stateFunction · 0.64
test_bare_mixin_stateFunction · 0.64