Visual studio code changes format (React-JSX)

后端 未结 12 1052
难免孤独
难免孤独 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:52

    Install Prettier (if not installed by default) and try to add this to your user or workplace settings:

    "prettier.jsxBracketSameLine": true

    Do not put linebreak between return and the returned JSX expression.

    Trigger autoformat (Alt+Shift+F) and check if works.

提交回复
热议问题