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.

cntrl shift p result

Now, in that window, type install, and from options, select Package Control: Install Package.

install package in sublime text

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.

activating syntax in sublime

And your react files will look like below.

syntax highlight in sublime

Write for us
DelftStack articles are written by software geeks like you. If you also would like to contribute to DelftStack by writing paid articles, you can check the write for us page.

Related Article - React Syntax

  • Using Async Syntax in the useEffect Callback