use "jsx" grammar in visual studio code. visual studio code report an error
Please help me. Thanks!!!
The symbol "<" should appear in the same line with the tag name.
For example, instead of doing that:
return ( <
button className="square"> {/*TODO*/} <
/button>
)
Do that:
return(
<button className="square">
{/*TODO*/}
</button>
)
If you want to split the tag to multiple lines, you can do it like that:
return (
<button
className="square"
id="id"
onClick={someFunc}
>
{/*TODO*/}
</button>
)