If a JSX expression takes up more than one line, what should you do?

You should wrap the multi-line JSX expression in parentheses. This looks strange at first, but you get used to it:

(
<a href="https://www.facebook.com">
<h1>
Click here
</h1>
</a>
)

Comments

Contact Form

Send