React Cheat Sheet

June 16, 2021

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!


Profile picture

I'm a software engineer, lives in Chennai, India. Full Stack developer and Certified Microsoft Azure DevOps Expert. Love to travel, cycling, reading non-fiction books, architecture photography. Fan of Minimalism.
More about me → My Projects →