React Project 만들기
yarn global add create_react_app yarn global add npx npx create-react-app myapp yarn add prop-types package.json과 같은 경로에 .env 파일 만듬 .env 안에 NODE_PATH=src port 설정도 .env 안에 yarn add react-router-dom ----react 구조----- * index.js - render App.js * App.js, GlobalStyle.js render Router.js,GlobalStyle.js THEN export App * Router.js 감싸기 < Router > <> < Header /> < Switch > < Route path = "/" exact component = { Home } /> < Route path = "/tv" component = { TV } /> < Route path = "/search" component = { Search } /> < Route path = "/movie/:id" component = { Detail } /> < Route path = "/show/:id" component = { Detail } /> < Redirect from = "*" to = "/" /> </ Switch > </> </ Router > THEN export ()=> *Routes