
Getting Started
Creating a React project using TypeScript
Run the following command to create a TypeScript React Project.
yarn create react-app <app-name> --template-typescript
Migrating a Next project from JS to TS
- Create a simple Next.jsProject.
yarn create next-app <app-name>
- Install typescript,@types/node&@types/reactas a dev dependency.
yarn add typescript @types/node @types/react -D
- Rename the files to .tsx(files with jsx) and.ts(files without jsx)

- 
Run yarn dev. Next.js will automatically detect TypeScript and generate atsconfig.jsonfile.
- 
(Optional). Restart your typescript server inside vscode by ctrl + shift + Pand thenTypeScript: Restart TS Server.
