reflex/reflex/middleware
Masen Furer a2243190ff
[ENG-4326] Async ComputedVar (#4711)
* WiP

* Save the var from get_var_name

* flatten StateManagerRedis.get_state algorithm

simplify fetching of states and avoid repeatedly fetching the same state

* Get all the states in a single redis round-trip

* update docstrings in StateManagerRedis

* Move computed var dep tracking to separate module

* Fix pre-commit issues

* ComputedVar.add_dependency: explicitly dependency declaration

Allow var dependencies to be added at runtime, for example, when defining a
ComponentState that depends on vars that cannot be known statically.

Fix more pyright issues.

* Fix/ignore more pyright issues from recent merge

* handle cleaning out _potentially_dirty_states on reload

* ignore accessed attributes missing on state class

these might be added dynamically later in which case we recompute the
dependency tracking dicts... if not, they'll blow up anyway at runtime.

* fix playwright tests, which insist on running an asyncio loop

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-01-31 16:33:30 -08:00
..
__init__.py Rename pynecone to reflex (#1236) 2023-06-25 16:56:55 -07:00
hydrate_middleware.py [ENG-4326] Async ComputedVar (#4711) 2025-01-31 16:33:30 -08:00
middleware.py Remove Pydantic from some classes (#3907) 2024-09-13 12:53:30 -07:00