Use Babel to transform jsx only
问题 I am using Babel with React js. Problem is I don't want to convert es6 to es5. I want to keep using es6. I only need to transform jsx to js. This is my .babelrc { "plugins": ["transform-react-jsx"] } This is my code: import React from "react"; /****** Header *******/ export class Header extends React.Component { onSubmit = (e) => { e.preventDefault(); console.log('Submitting'); const errors = this.validate(); if (Object.keys(errors).length === 0) { this.setState({ loading: true }); fetch(this