๐ฏ ๋ฆฌ์กํธ ์ค์น ๋ฐ ์ ํ ๋ช ๋ น์ด
1. Node.js ๊ฒ์ ํ ์ต์ ๋ฒ์ ์ ์ค์นํ๋ค.
2. Visual Studio Code ์๋ํฐ๋ฅผ ์ค์นํ๋ค.
3. ์ฝ๋๋ฅผ ์์ฑํ ํด๋๋ฅผ ์์ฑํ ํ, ์๋ํฐ์์ ์์ ํด๋๋ฅผ Open Folder ํ๋ค.
4. ํฐ๋ฏธ๋์์ npx create-react-app ํ๋ก์ ํธ๋ช ์ ์ ๋ ฅํด์ ๋ฆฌ์กํธ ํ๋ก์ ํธ๋ฅผ ์์ฑํ๋ค.
5. cd ํ๋ก์ ํธ๋ช (ํด๋) ๋ช ๋ น์ด๋ฅผ ํตํด ํ๋ก์ ํธ๋ช ์ ํ์ํด๋๋ก ์ด๋ํ๋ค.
6. ์ฝ๋ ์์ฑ ํ, ํฐ๋ฏธ๋์์ npm start๋ฅผ ํตํด ํ๋ก์ ํธ๋ฅผ ์คํํ๋ค.
๐ฏ ๋ฆฌ์กํธ ํ๋ก์ ํธ ์์ฑ ํ ์ ๋ฆฌ ๋ฐ ํ์ธํ ํ์ผ
1. public ํด๋ > logo.png, manifest.json ์ญ์
2. src ํด๋ > App.js์์ ์ปดํฌ๋ํธ๋ค์ ๋ก๋ ํ ์ฌ์ฉ
๐ฏ ๋ฆฌ์กํธ ํ๋ก์ ํธ git repository์ ์ ๋ก๋
1. git repository ์์ฑ
2. git init์ ํ๊ธฐ ์ํด rm -r .git์ ํตํด ์ด๋ฏธ ์กด์ฌํ๋ .git ํ์ผ์ ์ง์์ค๋ค.
3. git init์ ํตํด git ํ๊ฒฝ์ ๋ง๋ค์ด์ค๋ค.
4. ์์ฑํ repository๋ฅผ git remote add origin repository์ฃผ์๋ฅผ ํตํด remote๋ก ๋ฑ๋กํ๋ค.
5. git add .๋ฅผ ํตํด create-react-app์ผ๋ก ๋ง๋ค์ด์ง ํ์ผ๋ค์ stagingํ๋ค.
6. git commit -m "first commit"
7. git push origin master
[ ์ฐธ๊ณ ]
- https://www.youtube.com/watch?v=nahwuaXmgt8
- https://velog.io/@dev_sanghoon/React-create-react-app%EC%9C%BC%EB%A1%9C-%EB%A7%8C%EB%93%A0-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-git-repository%EC%97%90-%EC%97%85%EB%A1%9C%EB%93%9C%ED%95%98%EA%B8%B0
'web > react' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[React] props (0) | 2021.09.15 |
---|---|
[React] useEffect (0) | 2021.09.15 |
[React] ์ปดํฌ๋ํธ์ state (0) | 2021.09.13 |