How to set up Sublime Text 3 for React?

Viewed 19174

I'm trying to set up my Sublime Text 3 for React like the screenshots in this link, didn't succeed to make it though.

Maybe I have some extra packages or settings that would show my index.js syntax like below:

enter image description here

sublime-settings:

{
    "auto_complete": true,
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
    "dictionary": "Packages/Language - English/en_US.dic",
    "ensure_newline_at_eof_on_save": false,
    "font_face": "MONACO",
    "font_size": 16,
    "show_line_endings": true,
    "show_panel_on_build": true,
    "spell_check": true,
    "theme": "Adaptive.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true
}

I also have these packages:

enter image description here

How do I do that?

(Thanks! I'm new to React/js/jsx)

3 Answers

Use the Default JSX style of Sublime Text.

GoTo:

View -> Syntax -> Javascript -> JSX

Alternatively you can select the syntax from the bottom right status bar menu of Sublime text.

Open the command palette: ⌘+shift+p on MacOS/Linux, ctrl+shift+p on Windows

type install, select Package Control: Install Package

type React, select ReactJS

Related