Articles

TypeScript Articles by Matt Pocock

TypeScript Discriminated Unions for Frontend Developers

As a frontend developer, your job isn't just pixel-pushing. Most of the complexity in frontend comes from handling all the various states your app can be in. It might be loading data, waiting for a form to be filled in, or sending a telemetry event - or all three at the same time. If you aren't handling your states properly, you're likely to come unstuck. And handling states starts with how th
Matt Pocock
Matt Pocock