From ee8e89e3fa88b19553ef3614bfcba2bafe33831a Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 29 Jul 2025 18:39:08 -0700 Subject: [PATCH 1/2] prevent tag special props from being a shared mutable reference --- reflex/components/component.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 438d9404367..2da9d0723c8 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -964,7 +964,7 @@ def _render(self, props: dict[str, Any] | None = None) -> Tag: # Create the base tag. tag = Tag( name=name, - special_props=self.special_props, + special_props=self.special_props.copy(), ) if props is None: @@ -2413,7 +2413,6 @@ def create(cls, component: Component) -> StatefulComponent | None: tag_name = cls._get_tag_name(component) if tag_name is None: return None - # Look up the tag in the cache stateful_component = cls.tag_to_stateful_component.get(tag_name) if stateful_component is None: From 1e1e9e4021f70f39bb52d29845aa02bf5c1387d0 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 29 Jul 2025 18:40:49 -0700 Subject: [PATCH 2/2] no annoying extra lines --- reflex/components/component.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reflex/components/component.py b/reflex/components/component.py index 2da9d0723c8..bc07ef2652c 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -2413,6 +2413,7 @@ def create(cls, component: Component) -> StatefulComponent | None: tag_name = cls._get_tag_name(component) if tag_name is None: return None + # Look up the tag in the cache stateful_component = cls.tag_to_stateful_component.get(tag_name) if stateful_component is None: