create-react-app is a command-line tool that we can use to quickly create a React and TypeScript app with lots of useful pieces.
Open Visual Studio Code in an empty folder of your choice. Let's create an app using this tool:
- We use the create-react-app npm package to create a React and TypeScript project by entering the following:
npx create-react-app my-react-ts-app --typescript
The npx tool temporarily installs the create-react-app npm package and uses it to create our project.
We chose to call our project my-react-ts-app. We also specified --typescript, which is the bit that tells the tool to set the project up with TypeScript.
The tool will take a minute or so to create your project.
Note that the version of ...