Sublime Forum

JSX in React

#1

Hello! There was a problem editing JSX in the render method of React. Sublime tag “< / div>” or " < / h1>" is very strange. The editor does not see the end of the block after these tags.

Version 3143. Pkgs:
AllAutocomplete, AutoFileName, BracketHighlighter, Emmet, Babel, JavaScript Completions, JsPrettier, Terminal, TerminalView.

Thanks…

0 Likes

#2

The core JavaScript syntax does not support JSX. The Babel package you have installed should, however. I can tell from the screenshot that you are using the core syntax, not Babel’s syntax (named “JavaScript (Babel)”).

As an alternative, I suggest JS Custom, which provides the best available JSX highlighting. The Babel package is badly outdated.

4 Likes

Sublime 3 - Highlight Mid Way
Weird syntax coloring / Linux Mint
#3

Thank you so much! Now everything is fine!

0 Likes