DoctorC
DoctorC

Reputation: 115

How to set up jsx syntax highlight and Intellisense in Visual Studio Code 1.5.2?

I'm new to Reactjs and I'm trying to configure VSCode for react and jsx.

The available information seems outdated... I managed to configure reactjs in VScode.

I installed the following extensions:

VSCode Language mode now shows "Javascript React".

What I can't get to work is react-jsx syntax highlight and intellisense. What am I missing? Are there any instructions about jsx configuration?

Windows 10 64, VSCode 1.5.2, react files in .js

Thanks,

Enrico

Upvotes: 5

Views: 5982

Answers (2)

Dawngerpony
Dawngerpony

Reputation: 3573

I'm not contradicting the previous answer, but it's also worth noting that this issue is currently open because VS Code is not highlighting syntax or formatting code for text/jsx blocks inside HTML files. At the time of writing, there is a PR open (linked from the issue) which will hopefully fix the issue but it has not yet been merged.

Upvotes: 2

Matt Bierner
Matt Bierner

Reputation: 65175

VS Code supports JSX syntax highlighting and IntelliSense out of the box. It also supports features like auto-closing tags and auto imports for JSX

You do not need to install extensions. Many of the ones referenced in the question will actually cause problems and are not actively being maintained

Upvotes: 1

Related Questions