0

When i save file index.js vscode format it from

render(
  <Provider store = { store }>
    {routes}
  </Provider>,
    document.getElementById('root')
);

to

render( <
    Provider store = { store } > { routes } <
    /Provider>,
    document.getElementById('root')
);

after that the program doesn't work and i have error message

React.Children.only expected to receive a single React element child.

What settings in vscode i need to change to fix this bug?

Vitaliy
  • 29
  • 2
  • did you do any searches? I mean, there's a question right here on SO with a solution - https://stackoverflow.com/questions/44993808/visual-studio-code-changes-format-react-jsx – Jaromanda X Aug 31 '17 at 05:20
  • Basically it messed up your code. the close tag `` has been split over 2 lines. The opening tag has also been split. Put them back and it should work, and turn off VSCode autoformat option :) – Mikkel Aug 31 '17 at 05:57

0 Answers0