TypeScript with React: Setup

Posted Jun 21, 2020

A handy setup to use when working with TypeScript and React.

Use Create React App to create the project:

$ create-react-app <name> --typescript

Use Prettier to prettify the code:

$ yarn add prettier --dev --exact
$ yarn run prettier --write src/**/*.tsx