TypeScript: which codebase I should study to get better at? Getting started with TypeScript and React. I’ve recently been getting into TypeScript following a lot of positive blogs about it from Tom Dale and others.
Today I’ll show you how I’ve set up a TypeScript project from scratch that uses React, and Webpack for managing the build process. I’ll also discuss my initial impressions of TypeScript and in particular working with TypeScript and ReactJS. I won’t be going into detail on the specifics of TypeScript’s syntax, but you can read either the TypeScript handbook or the free book TypeScript Deep Dive which will also give you a great introduction to the language. Installing TypeScript and configuring it The first thing to do was install TypeScript locally into my node_modules directory, which I did using Yarn, first using yarn init to create a new project: yarn init yarn add typescript When you install TypeScript you get the tsc command line tool which can compile TypeScript but also create a starting tsconfig.json for you to edit.
Tl;dr So far I’ve been hesitant to embrace static type checkers like TypeScript.