How to conditionally create child based on state? #454
-
I would like to create a child only when a boolean state is true. I attempted to do that by doing something like the following, as suggested by the AI chatbot on the vanjs site: If I replace |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, but that will use the stringification of |
Beta Was this translation helpful? Give feedback.
-
In VanJS, returning See Section |
Beta Was this translation helpful? Give feedback.
Yes, but that will use the stringification of
[]
which is just the empty string so you could also use""
.