Adding TypeScript to my cat friends app! https://github.com/kanjamad/cat-friends-react.js-app
- TypeScript
- Javascript
- React.js
- HTML
- CSS
- ESlint
- Prettier
To start a new Create React App project with TypeScript, you can run:
npx create-react-app my-app --template typescript
# or
yarn create react-app my-app --template typescript
To add TypeScript to an existing Create React App project, first install it:
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
Next, rename any file to be a TypeScript file (e.g. src/index.js to src/index.tsx) and restart your development server!