I am using the ReactJS tutorial here
I opened the project in VS Code ver 1.18 by using > code .
.
After I create a file index.js, then add the code as given:
class Square extends React.Component {
render() {
return (
<button className="square">
{/* TODO */}
</button>
);
}
}
When I hit Ctrl-S to save, VS Code does the following:
class Square extends React.Component {
render() {
return (document.render() < button className = "square" > { /* TODO */ } <
/button>
);
}
}
Note: the changes to <button>
.
All the code gets reformatted.
I checked VS codes for formatting - it is false.
Intellisense works fine.
I also added jsconfig.json
in my src
folder using "jsx": "react"
.
Is VS code really not usable or am I missing anything?