티스토리 뷰
1. npx create-react-app my-app 을 한 후 의 폴더 구조 입니다.
my-app/
README.md
node_modules/
package.json
public/
index.html
favicon.ico
src/
App.css
App.js
App.test.js
index.css
index.js
logo.svg
2. 처음 npm start를 했을 때 나오는 화면은 src/ app.js 파일 입니다.
3. app.js는 index.js에 App 컴포넌트로 들어가 있는 형태입니다.
document.getElementById('root')) 는 public/index.html의 id="root "를 그려줍니다.
- public/index.html -> page template
- src/index.js -> Javascript entry point
public/
index.html
favicon.ico
- public 폴더에 있는 파일들은 오직은 public/index.html만 쓰일 수 있습니다.
src/
App.css
App.js
App.test.js
index.css
index.js
logo.svg
- Webpack에 의해 관리가 되는 파일들은 src 폴더 안에 있는 것만 관리가 되기 때문에 css와 image 파일들은 src 폴더에 넣어주어야 합니다. 그렇지 않으면 webpack에 의해 관리가 되지 않습니다.
https://create-react-app.dev/docs/folder-structure
Folder Structure | Create React App
After creation, your project should look like this:
create-react-app.dev
'프론트엔드 > React' 카테고리의 다른 글
| Redux (0) | 2023.02.03 |
|---|---|
| React Router Dom (0) | 2023.02.02 |
| npm, npx (0) | 2023.01.18 |
| Nodemon (0) | 2023.01.17 |
| Node.js / express.js (0) | 2023.01.16 |
- Total
- Today
- Yesterday
- npm
- React.js
- Portal
- slick-slide
- 퍼블리싱
- 로그인폼
- 퍼블리셔
- file-saver
- javascript
- CSS
- 리액트 포탈
- 프론트엔드
- 탭메뉴
- 개발
- paging-custom
- react excel 다운
- frontend
- 페이징 커스텀
- 프론트엔드개발
- excel down
- css3
- excel custom
- 슬릭 슬라이드
- react
- 제이쿼리
- jQuery
- node.js
- HTML
- react portal
- 디자인시스템만들기
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |