HTML templates describe a component’s view. Framework directives can change DOM elements’ behavior—for example, showing a paragraph only when application state indicates a discount. section 1.3.1
<p v-if="hasDiscount"> You get a discount! </p>
Vue uses v-if to conditionally display the paragraph. section 1.3.1
{#if hasDiscount}
<p>
You get a discount!
</p>
{/if}
Svelte expresses the same condition with an if block. section 1.3.1
{hasDiscount && <p>You get a discount!</p>}
React expresses the condition in JSX rather than an HTML template directive. section 1.3.1




















