reflex/reflex/istate
Masen Furer 736b2a6ea9
Handle rx.State subclasses defined in function (#4129)
* Handle rx.State subclasses defined in function

* create a new container module: `reflex.istate.dynamic` to save references to
  dynamically generated substates.
* for substates with `<locals>` in the name, copy these to the container module
  and update the name to avoid duplication.
* add test for "poor man" ComponentState

Fix #4128

* test_state: disable local def handling for dupe-detection test

* Track the original module and name for type hint evaluation

Also use the original name when checking for the "mangled name" pattern when
doing undeclared Var assignment checking.
2024-10-11 16:51:10 -07:00
..
data.py move router dataclasses in their own file (#4044) 2024-10-03 14:18:28 -07:00
dynamic.py Handle rx.State subclasses defined in function (#4129) 2024-10-11 16:51:10 -07:00