What is the purpose of index.js and App.js files in a React project?

In a typical create-react-app structure, index.js is the entry point where the React app is mounted to the DOM. App.js is the root component where the main application logic resides, which is then imported and rendered by index.js.