diff --git a/reflex/vars/dep_tracking.py b/reflex/vars/dep_tracking.py index 17a9371a1..0b2367799 100644 --- a/reflex/vars/dep_tracking.py +++ b/reflex/vars/dep_tracking.py @@ -123,7 +123,11 @@ class DependencyTracker: if not self.top_of_stack: return target_state = self.tracked_locals[self.top_of_stack] - ref_obj = getattr(target_state, instruction.argval) + try: + ref_obj = getattr(target_state, instruction.argval) + except AttributeError: + # Not found on this state class, maybe it is a dynamic attribute that will be picked up later. + ref_obj = None if isinstance(ref_obj, property) and not isinstance(ref_obj, ComputedVar): # recurse into property fget functions