React Cheat Sheet

To create new react project

npx create-react-app my-app

To create a react project in current directory

npx create-react-app .

To create a Typescript react project in current directory

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

To convert existing project to Typescript

npm install typescript @types/node @types/react @types/react-dom @types/jest

Rename any file to be a TypeScript file (e.g. src/index.js to src/index.tsx) and restart your development server!