React.js files syntax in sublime text 3

yasar  picture yasar · May 11, 2016 · Viewed 13.8k times · Source

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

Answer

ivarni picture ivarni · May 11, 2016

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).