#Which
3 messages · Page 1 of 1 (latest)
Hi @muted mantle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Your query appears to be about JavaScript/JSX conditional class name patterns, which is a general JavaScript question rather than something specific to Astro.
That said, both patterns are valid JavaScript expressions that can be used within Astro's JSX-like template syntax. Astro supports JSX-like expressions in its HTML templates. [Template expressions]
However, the knowledge sources do not contain enough information to make a specific recommendation between these two patterns in an Astro context. I can only confirm that Astro supports dynamic attributes using curly braces, for example:
<h1 class={name}>Attribute expressions are supported</h1>