How to Get Started With TypeScript using React?

You can get started with React and TypeScript by adding the –template switch to “create-react-app.”

npx create-react-app react-typescript-demo --template typescript

TypeScript files end with a *.tsx extension, which is required for it to be recognized.

React TypeScript Tutorial