Visual studio code changes format (React-JSX)

后端 未结 12 1062
难免孤独
难免孤独 2020-12-12 13:45

I\'ve the following snippet in my index.js

class App extends Component {
    render() {
        return ( 
Welc
12条回答
  •  余生分开走
    2020-12-12 13:49

    Make sure you dont have multiple javascript formatters enabled in your current workspace. (You have to disable the rest of them for your current workspace).

    react-beautify mostly does the magic but fails if you have some other JS formatter/beautifier already installed.

    In my case, I had react-beautify and JS-CSS-HTML Formatter extension installed. I had to disable the JS-CSS-HTML Formatter for my current workspace.

提交回复
热议问题