In Reflex, State is the single source of truth for your application's data. Unlike React where state is typically client-side, Reflex state lives on the server, allowing you to use Python's full power for business logic while keeping the UI in sync.
As your app grows, putting everything in one rx.State class becomes unmanageable and slow. Reflex allows you to split logic into Substates.
python
Sometimes one state needs to know about another. Reflex provides two key async methods for this:
Retrieves the entire instance of another state. Use this when you need to call methods or modify multiple variables in the target state.
python
A more efficient way to retrieve a single value without loading the entire target state object.
python