Is this the simplest way to add a single line comment in the middle of jsx?
<div>
<br /> { /* this is a comment */ React.null }
</div>
Is this the simplest way to add a single line comment in the middle of jsx?
<div>
<br /> { /* this is a comment */ React.null }
</div>
This also works:
<div>
<br />
// This is a comment
React.null
</div>
EDIT: if you’re asking if React.null
is needed, then no, it’s not.