how to comment in html in react code example

Example 1: how to add comment in react js

{/* A JSX comment */}

Example 2: comment out html in react

how to add multiple comment in react

{/* 
  Multi
  line
  comment
*/}

Example 3: Comments inside children section of tag should be placed inside braces

<div className="dropdown">
    {/* whenClicked is a property not an event, per se. */}
    <Button whenClicked={this.handleClick} className="btn-default" title={this.props.title} subTitleClassName="caret"></Button>
    <UnorderedList />
</div>

Tags:

Html Example