Why does create-react-app creates both App.js and index.js? : <p>I started learning React and now I'm trying to understand what is the purpose of the <code>index.js</code> and <code>App.js</code> which are created by by running <a href="https://github.com/facebook/create-react-app" rel="noreferrer">create-react-app</a>.</p>

<p>Why can't we just use, for example. <code>App.js</code>?</p>

<p>I've read that App.js usually used as a main entry point to the application, but auto-generated code of <code>index.js</code> seems like a part of main entry point:</p>

<pre><code>import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(&lt;App /&gt;, document.getElementById('root'));
registerServiceWorker();
</code></pre>

<p>I saw a similar questions for react native but I want to know about this in react in general.</p>
