I started a react project using create-react-app few months ago and I\'m interesting in migrating the project from Javascript to Typescript.
I saw that there is a wa
Create React App v2.1.0 was released today with TypeScript support today. That means you no longer need to eject or use the react-scripts-ts
fork; all you need to do if you have an existing Create React App project is install the required packages:
$ npm install --save typescript @types/node @types/react @types/react-dom @types/jest
$ # or
$ yarn add typescript @types/node @types/react @types/react-dom @types/jest
You can then simply rename .js
files to .ts
files to start using TypeScript.
(If you have an existing app using the create-react-app-typescript fork, here's a tutorial on how to port it to regular Create React App.)