Create-react-app + Typescript + Redux 설치하기

Jayden ·2023년 3월 19일
0

npx 명령어로 리액트 프로젝트 + 타입스크립트 + 리덕스 개발환경을 한번에 세팅해 보도록 하겠습니다.

https://www.npmjs.com/package/cra-template-redux-typescript

$npx create-react-app travel-react-app --template redux-typescript

# or

$yarn create react-app travel-react-app --template redux-typescript

명령을 사용하여 프로젝트를 생성하도록 합니다.

if ) 기존 CRA 프로젝트에서 추가할 경우

$ npm i redux
$ npm i react-redux
$ npm i @reduxjs/toolkit
같이 추가 가능합니다.

cd travel-react-app와 같이 생성된 프로젝트 경로로 들어간 후 package-json파일을 확인해보면 typescript, react-redux, @reduxjs/toolkit이 설치되어 있음을 확인할 수 있습니다.

npm i --save styled-components
npm i --save-dev @types/styled-components

profile
J-SONE 프론트엔드 개발자

0개의 댓글