János
János

Reputation: 35050

Why Atom does not accept the syntax of JSX file?

I have here this expression:

<QRCode
  value={`${formattedBchAddress}`}
  style={{ alignSelf: "center" }}
/>

and Atom does not accept it, though it seems syntactically it is correct.

enter image description here

Upvotes: 0

Views: 166

Answers (1)

idleberg
idleberg

Reputation: 12882

I‘m answering on the assumption that you did not install a package that provides JSX highlighting, but instead use the built-in language-javascript. Since JSX isn‘t part of the ECMAScript standard, I‘d argue that you shouldn‘t expect it to be supported by JavaScript language grammar.

Fortunately, there‘s the popular language-babel which includes JSX support among other things. While this is the package with the most downloads and ratings, let me also point out that there are alternatives to choose from.

Upvotes: 1

Related Questions