How can I use comments inside the render
method in a React component?
I have the following component:
\'use strict\';
JavaScript comments in JSX get parsed as Text and show up in your app.
You can’t just use HTML comments inside of JSX because it treats them as DOM Nodes:
render() {
return (
)
}
JSX comments for single line and multiline comments follows the convention
Single line comment:
{/* A JSX comment */}
Multiline comments:
{/*
Multi
line
comment
*/}