Create React App using npm command with TypeScript


If you want to create react application using the command line (terminal) with TypeScript as the default template we need to add the option --template=typescript along with the create-react-app command.


Syntax:
npx create-react-app <project-folder-name> --template=typescript

Example:

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

Create react application with TypeScript Example

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap