How to Add React Syntax in Sublime
We will introduce how to use the React syntax in Sublime Text.
React Syntax in Sublime Text
Syntax highlighting is a strategy to improve the readability and context of the code. It is a great help for programmers who have to read all code to debug errors in the code.
Sublime Text is a good text editor used widely among developers because it is free and lightweight. Many developers face syntax highlighting
issues especially react developers.
There is a very easy way to solve this problem.
If you are on windows, press Cntrl + Shift + P, or if you are on a mac, press cmd + Shift + P. That will open this window.
Now, in that window, type install
, and from options, select Package Control: Install Package
.
Another window will open, and in that window, write Babel
, and select Babel Snippets
from options. It will be installed in a few minutes.
Go to View > Syntax > Javascript (Babel)
and it will activate the syntax highlight.
And your react files will look like below.
Rana is a computer science graduate passionate about helping people to build and diagnose scalable web application problems and problems developers face across the full-stack.
LinkedIn