Create React App을  TypeScript 템플릿으로 설치하려면 기존 방법에 문구를 추가해서 만들 수 있다. 

 

​Npm

npx create-react-app my-app --template typescript

cd my-app

npx start

​Yarn

 

yarn create react-app my-app --template typescript

cd my-app

yarn start

 

위 코드에서 my-app은 리액트 프로젝트를 설치할 dir이다. 현재 위치한 곳에 설치하려면 my-app 대신 . 을 적으면 된다.

 

 

참고

https://create-react-app.dev/docs/adding-typescript/

'Front-End > Typescripit' 카테고리의 다른 글

React Redux 앱 셋팅  (0) 2022.05.16

+ Recent posts