You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A ComputedVar should be recomputed everytime the state is touched, even if there are no changes. This only occurs for the base State, not for substates.
State.get_delta is only recursing into substates which have been marked dirty, and if the substate does not have any other changes, then the ComputedVar itself would not be sufficient to have the substate marked dirty.
…ates
Instead of calculating these every time there is a delta, determine them
at subclass definition time (or when adding a var dynamically).
This should improve performance for every delta calculation.
It also fixes#2066 by tracking substates which have ComputedVar with
_cache=False
Fix REF-1035
…ates
Instead of calculating these every time there is a delta, determine them
at subclass definition time (or when adding a var dynamically).
This should improve performance for every delta calculation.
It also fixes#2066 by tracking substates which have ComputedVar with
_cache=False
Fix REF-1035
Describe the bug
A ComputedVar should be recomputed everytime the state is touched, even if there are no changes. This only occurs for the base State, not for substates.
To Reproduce
Expected behavior
Clicking either button should update the timestamp in both states, since they are both
@rx.var
.However,
SubState.last_update2
only gets recomputed when some other var in the substate changes.Specifics (please complete the following information):
Additional context
The problem seems to be here
reflex/reflex/state.py
Lines 1123 to 1124 in 2693340
State.get_delta
is only recursing into substates which have been marked dirty, and if the substate does not have any other changes, then the ComputedVar itself would not be sufficient to have the substate marked dirty.#2067
From SyncLinear.com | REF-1035
The text was updated successfully, but these errors were encountered: