We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d34f26 commit 15320bcCopy full SHA for 15320bc
1 file changed
reflex/experimental/memo.py
@@ -253,7 +253,14 @@ def _is_component_annotation(annotation: Any) -> bool:
253
Whether the annotation resolves to Component.
254
"""
255
origin = get_origin(annotation) or annotation
256
- return isinstance(origin, type) and issubclass(origin, Component)
+ return isinstance(origin, type) and (
257
+ issubclass(origin, Component)
258
+ or bool(
259
+ issubclass(origin, Var)
260
+ and (args := get_args(annotation))
261
+ and issubclass(args[0], Component)
262
+ )
263
264
265
266
def _children_annotation_is_valid(annotation: Any) -> bool:
0 commit comments