diff --git a/reflex/components/component.py b/reflex/components/component.py index 61b47d2f2..e538eb063 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -553,7 +553,8 @@ class Component(Base, ABC): Returns: The ref name. """ - if self.id is None: + # do not create a ref if the id is dynamic or unspecified + if self.id is None or isinstance(self.id, BaseVar): return None return format.format_ref(self.id)