VSCode seems doesn't auto indent HTML elements in jsx?
Is there any way to fix it.
Update:
In Atom:
When I input <div>
, atom will show:
After I press the return
key, the result is(pay attention to the location of the cursor):
While in VSCode:
You can use hot key Ctrl+M (Command+M) to beautify your JSX file.
Try changing the language mode to JavaScript React.
change language mode
javascript react
Once that's done, you'll see the JavaScript React mode in the bottom left corner.
Once you're in that mode, try again to format the document.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With