Describe the bug
When you directly pass a python data structure (nested BaseModel) to components you will sometimes get an exception that is hard to understand. It is made more difficult to figure out because accessing some nested elements of the data structure display fine while accessing others causes the exception.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either a clear exception explaining how data must be associated with State or allow static data structures to be used fully without exceptions. For example you have a catalog that won't change during the session so it doesn't need to be tracked via state.
Specifics (please complete the following information):
- Python Version: 3.14
- Reflex Version: 0.9.3
- OS: Ubuntu 24.04.2 LTS
Describe the bug
When you directly pass a python data structure (nested BaseModel) to components you will sometimes get an exception that is hard to understand. It is made more difficult to figure out because accessing some nested elements of the data structure display fine while accessing others causes the exception.
To Reproduce
Steps to reproduce the behavior:
In the repo below, just run the app. There are two section that can be commented out/in to demonstrate the exception and how the exception doesn't happen for some references into the data structure.
Code/Link to Repo: https://github.com/bertbarabas/test_reflex_no_state_data
Expected behavior
Either a clear exception explaining how data must be associated with State or allow static data structures to be used fully without exceptions. For example you have a catalog that won't change during the session so it doesn't need to be tracked via state.
Specifics (please complete the following information):