I'm trying to learn React and am following a few tutorials. When I run the create-react-app command from my terminal however, my App.js file is not the ES6 version that I see with tutorials. Instead it contains the following:
import React from 'react';
import logo from './logo.svg';
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
export default App;
instead of the ES6 style syntax...
class App extends React.Component {
//...
}
Why is this and how can I change it so that when I run the command to create an app it automatically creates a more up-to-date version?
Thank you
React.createClass.