Variables

You can reference the value of a system variable using curly brackets like this:

{element}

In practice variable references should never appear on their own, but rather be nested between tags:

<h2>{article.title}</h2>

You can also use template literals inside of curly brackets:

<a href={`/${article.relative_url}`}>Read more</a>

Last updated