We cannot use HTML comments inside of JSX because it thinks they are real DOM Nodes:
render() {
return (
<div>
<!-- This doesn't work! -->
</div>
)
}
We can use regular /* Block Comments */, but this need to be wrapped in curly braces:
{/* A JSX comment */}
render() {
return (
<div>
<!-- This doesn't work! -->
</div>
)
}
We can use regular /* Block Comments */, but this need to be wrapped in curly braces:
{/* A JSX comment */}
Nice Blog,
ReplyDeleteThe details that you mentioned in this blog regarding React js development.
I was searching for the best react js development company and found your blog.
Thanks for sharing such a great blog.
Synsoft Global