React – Comments

Comments In React

https://stackoverflow.com/questions/30766441/how-to-use-comments-in-react#comment103855263_30766542

Within the render method comments are allowed, but in order to use them within JSX, you have to wrap them in braces and use multi-line style comments.

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

You can read more about how comments work in JSX here.

And something like

{/* comment */} creates error. comment must be in a new line.