Reputation: 199
I use sublime text to learn React.js, and a I have a problem with syntax. When there is a / on my code, all the code after the / have a different color, as if the / change the syntax of the code.
for exemple, if a write :
export default class Featured extends React.Component {
render(){
return (
<h1> Featured </h1>
);
}
}
all the code have a correct color syntax until the , after the / in the tag, all the syntax is orange .. I don't understand, I have install jsx / babel / react plugins on my sublime text ..
Does someone could help me ?
Thank !
Upvotes: 0
Views: 155
Reputation: 1616
As an alternative, this syntax https://github.com/borela/naomi covers ReactJS, JSX, Flowtype and ES2017+ where I am adding support even for Stage 0 features.
Upvotes: 0
Reputation: 13385
You'll need syntax highlighting especially built for JSX and ES6/Babel. Try this: https://github.com/babel/babel-sublime
Upvotes: 3