index.js : 입구 파일, 전역 설정 포함
= npm start 를 이용해 create-react-app을 구동 시키면 index.js 파일을 찾고 안의 내용대로 동작
App.js : 안의 함수에 있는 코드가 화면을 구성 (내용 편집 | UI 생성)
App.css : App.js 안 코드의 css 파일
index.css : index.js 안 코드의 css 파일
// index.js 파일
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
⇒ App 태그가 id 값이 root인 태그로 렌더링해라
npm run build : build (배포판을 만드는 과정) 실행 → build 폴더 생성됨
npx serve -s build : build 폴더에 있는 index.html을 서비스해주는 웹 서버 실행
(serve -s build : 폴더 안에 있는 index.html 파일을 서비스해 주겠다.)