Next.js - Set up with TypeScript

Learn how to integrate TypeScript to your Next.js project

Steps

  1. Create tsconfig.json

  2. Install the required packages

  3. Converting files from .js to .tsx

1. Create an empty tsconfig.json file in the root of your project:

touch tsconfig.json

2. Install the required packages

yarn add --dev typescript @types/react @types/react-dom @types/node

Last updated

Was this helpful?