How to write comments in React?

The comments in React/JSX are similar to JavaScript Multiline comments but are wrapped in curly braces.

Single-line comments:

<div>
{/* Single-line comments(In vanilla JavaScript, the single-line comments are represented by double slash(//)) */}
{`Welcome ${user}, let's play React`}
</div>

Multi-line comments:

<div>
{/* Multi-line comments for more than
one line */}
{`Welcome ${user}, let's play React`}
</div>

Author of content
Edit this page

Made by Michael Sakhniuk

Twitter