From 1bb69e1081b0ecebd54b0ddfa7c9f8f369be7e32 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 29 May 2025 16:56:16 -0700 Subject: [PATCH] add style recursive for memo --- reflex/components/component.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 6f5721afd1b..66d286d2871 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -2194,7 +2194,17 @@ def get_component(self) -> Component: Returns: The code to render the component. """ - return self.component_fn(*self.get_prop_vars()) + component = self.component_fn(*self.get_prop_vars()) + + try: + from reflex.utils.prerequisites import get_and_validate_app + + style = get_and_validate_app().app.style + except Exception: + style = {} + + component._add_style_recursive(style) + return component CUSTOM_COMPONENTS: dict[str, CustomComponent] = {}