Setting up proper React Code highlighting in Visual Studio Code?
I just added this to settings.json
and it worked for me, so you can give it a try.
"files.associations": {
"*.js": "typescriptreact"
}
JSX highlighting works out of the box in VS code and JSX files are already associated with JavaScript React
language mode. If you want to enable JSX syntax coloring in .js
files click on the language name in the status bar and select JavaScript React
language mode. You can also associate .js
files with JavaScript React
if you don't want to do this every time. Make sure you have the latest version of VS Code.
Change the VS CODE color theme to Dark+ and change the language in bottom status bar to java script react. This worked for me
For Me Here is what worked
- Update the vscode by downloading the latest verrsion
https://code.visualstudio.com/download
2.Open Vscode click extension and search this extension
Javascript Atom Gramar
Just disable the extension.
3.Close and open vscode, now u should see colors in your jsx code.
Hope this will help some one in future