Search code examples
javascriptreactjssublimetext3jsxbabeljs

React.js files syntax in sublime text 3


i am using sublime text 3 as my code editor,i have written a basic hello world example in React.but the coloring is improper on the code ,i have tried installing Babel plugin but even after that also the coloring doesn't seem to work ,as you can see the image below

enter image description here


Solution

  • Just installing it isn't enough, you have to also tell SublimeText to use it.

    Either do

    a) Ctrl-Shift-P, type "Babel" and select Set Syntax: Javascript(Babel)

    or

    b) Go to the menu and do View->Syntax->Open all with current extension as...->Babel->Javascript(Babel).