score:227
Installing babel fixes the syntax highlighting.
Steps to install babel on sublime3:
- For windows: Press Ctrl+Shift+P For mac: Cmd+Shift+P
- Then type
install
and selectPackage control: Install Package
- Then type
Babel
and select'Babel-Snippets'
. It will install babel in few moments. - Then set the Babel syntax in Sublime3 Editor from:
View > Syntax > Babel > Javascript
For some users, Babel
was missing in step 4. They can additionally install Babel
by following the same steps and selecting Babel
this time instead of Babel-Snippets
in step3.
Check I tested it:
score:-1
I was able to solve this by setting the syntax to JSX. I didn't need to install this plugin.
score:1
1- Go to package control 2- Search for naomi-syntax and install it. 3- Then set the naomi-syntax syntax in Sublime3 Editor from: View > Syntax > naomi-syntax.
score:3
- Step 1 - Go to Package Control ( ctrl + shift + p)
- Step 2 - Select install package
- Step 3 - Search for JSX plugin and install it.
- Step 4 - Then set the JSX syntax in Sublime3 Editor from: View > Syntax > JSX.
Use filename with .jsx
extension
score:4
You need to install babel-sublime
plugin.
You can install it from package control
of sublime.
Here is the link - https://github.com/babel/babel-sublime
Source: stackoverflow.com
Related Query
- syntax highlighting for react code in sublime
- syntax highlighting for JSX not working in sublime text 3
- GitHub Code highlighting for React file with js extension
- Highlighting curl code snippet in react syntax highlighter
- Using mixins vs components for code reuse in Facebook React
- Can you use es6 import alias syntax for React Components?
- Why is arrow syntax preferred over function declaration for functional React components?
- How to fix Sublime text highlighting for react-tutorial?
- How to get code completion for typed react component properties?
- Setting up proper React Code highlighting in Visual Studio Code?
- React Syntax Error : Expected corresponding JSX closing tag for <img>
- Can react js web code be used for building mobile apps using react native?
- What is the syntax for click events in React Hooks for passing arguments
- How to implement the OAuth2 Authorization code grant with PKCE for a React single page application?
- How to define comment characters for React JSX in Sublime Text?
- What does this React code with an anonymous closure do for validateFormat?
- Built-in snippet not working in VS Code for React
- React Native start failed with error code -4094 how to solve this ONCE for ALL?
- Expo QR code not showing for a React Native App
- Regular expression for syntax highlighting attributes in HTML tag
- Do react native uses same code for ios and android or both platform code should be written separately?
- No syntax highlighting with React Monaco Editor
- Sublime doesn't syntax highlight React functions?
- What is the general practice for express and react based application. Keeping the server and client code in same or different projects/folders?
- How to enable VS code intellisense for absolute path imports in a React app?
- How do I get VS Code to understand my aliases in react native for command click?
- Sublime text 3 - React & FlowType syntax support, white syntax after type definition
- React : Rendering a syntax highlighted code block
- Support for the experimental syntax 'decorators-legacy' isn't currently enabled How To Enable In Create React App?
- Using (Or ||) syntax inside of React useState for assignment
More Query from same tag
- Mobx observable map to js array
- React js Material UI Switch Component in loop
- JEST testing on redux is not working as expected
- Why do I lose the current object state when 'this.props.actions.updateComment(event.target.value)' is called?
- Cannot read property of undefined when using map to render components
- Trouble programmatically changing routes with React Router
- VM892:1 Uncaught SyntaxError: Unexpected token e in JSON at position 0
- How to add custom font weights to Material UI?
- Add a type definition for a scoped package
- React-Redux: sending data from Child-component to store
- Dynamically set attribute key (e.g. data-{foo}="bar") in React
- What is causing Semantic-UI-React elements to break my basic Reactjs App?
- Using Figma Variants from React Amplify project
- React-router with BrowserRouter / browserHistory doesn't work on refresh
- ReactJS onClick without JSX
- Is the set function inside setState hook immutable?
- AG-Grid Distinguish Row Selections
- NoClassDefFoundError com.facebook.react.bridge.WritableNativeMap
- NextJS Router doesn't reload data until page refocus
- React.default.memo is not a function (React-Native) wrapWithConnect
- How can I change English numbers to Arabic numerals in modern HTML CSS?
- Focus property not working with styles, but before focus style works
- Handle udefined or null in child component in reactjs
- How to switch themes(light and dark) for all child components in a react application in blueprintjs v3?
- how to shorten useReducer
- I can't get checked row data with onRowSelected in Material UI DataGrid
- Change component value
- componentWillRecieveProps current props
- React application does not recognize require()
- Is there a way to change a bootstrap react card component's border size?