Jelajahi Sumber

Allow auto memoization of Component Cond

Masen Furer 2 minggu lalu
induk
melakukan
76ef25768f
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      reflex/components/core/cond.py

+ 2 - 2
reflex/components/core/cond.py

@@ -5,7 +5,7 @@ from __future__ import annotations
 from typing import Any, Dict, Optional, overload
 
 from reflex.components.base.fragment import Fragment
-from reflex.components.component import BaseComponent, Component, MemoizationLeaf
+from reflex.components.component import BaseComponent, Component
 from reflex.components.tags import CondTag, Tag
 from reflex.constants import Dirs
 from reflex.style import LIGHT_COLOR_MODE, resolved_color_mode
@@ -19,7 +19,7 @@ _IS_TRUE_IMPORT: ImportDict = {
 }
 
 
-class Cond(MemoizationLeaf):
+class Cond(Component):
     """Render one of two components based on a condition."""
 
     # The cond to determine which component to render.