JSX syntax in .js files gives an error in VS 2017

Viewed 383

I have a simple project in VS Code using React. All my javascript files are with a .js extension, including the files with react components, which apparently use the jsx syntax.

enter image description here

I decided to open my project in VS 2017 and now all my .js files with jsx syntax in them are giving me errors.

enter image description here

Any ideas on how to fix that and why VS Code understands the syntax while VS 2017 doesn't?

0 Answers
Related