From c61b2812f8d39a8704af0ef71fb0cef60b5bc7da Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 25 Oct 2024 16:38:41 -0700 Subject: [PATCH] ignore custom components in stateful components --- reflex/components/component.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reflex/components/component.py b/reflex/components/component.py index 9fea2f05b..2824af595 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -1968,6 +1968,10 @@ class StatefulComponent(BaseComponent): """ from reflex.components.core.foreach import Foreach + if isinstance(component, CustomComponent): + # Do not memoize custom components. + return None + if component._memoization_mode.disposition == MemoizationDisposition.NEVER: # Never memoize this component. return None