Tuesday, 31 January 2017

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>
)

WHAT OTHERS ARE READING/RELATED TO THIS:

0 comments:

Post a Comment