명령 프롬프트 또는 터미널을 실행 후 원하는 위치에 create-react-app을 사용하여 리액트 프로젝트를 생성합니다.
create-react-app disney_plus_clone
생성된 폴더를 기준으로 VSCode를 실행합니다.
2. Github 저장소와 연결하기
Github에 로그인 후 왼쪽 상단에 보이는 New를 눌러서 저장소 만들기 화면으로 이동합니다.
github에 새로운 repositories 추가하기
Repository name(저장소 이름) 에 disney_plus_clone을 입력한 후 Create repository를 누릅니다.
repository 설정하기
아래의 코드로 Github 저장소와 diseyplusclone 폴더를 연결합니다.
git remote add origin //[HTTPS주소 or SSH 주소]
3. 기초 파일 수정하기
index.js 파일을 열어서 필요하지 않은 코드를 삭제합니다.
import React from "react"
import ReactDOM from "react-dom"
import "./index.css" // 삭제
import App from "./App"
import reportWebVitals from "./reporWebVitals" // 삭제
React DOM.render(
<React.StricMode>
<App />
</React.StricMode>,
document.getElementById("root") )
// If you want to start meauring performance in your app, pass a function // 삭제
// to log results (for example: reporWebVitals(console.log)) // 삭제
// or send to an analyties endpoint. Learn more: http://bit.ly/CRA-vitals // 삭제
reportWebVitals() // 성능 측정을 위한 함수 => 삭제