TypeScript with React: Setup

Posted

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