Logo Awesome React

Awesome React

TypeScript: Why you have to add types even if you handle the undefined case

I had some code I was refactoring to TypeScript and TypeScript didn't like something I was doing: https://twitter.com/kentcdodds/status/1073666922066075649

I later came to understand why it was important to add types for it. Here's an explanation for why.