We've already learned about a fair amount of the type system in TypeScript. In this chapter, we'll continue on this journey, this time diving into some of the more advanced types and concepts that will help us later in the book to create reusable strongly type React components.
We'll learn about how we can combine existing types to create union type. We'll find out in Chapter 8, React Redux, that these types are fundamental to creating strongly typed React Redux code.
We briefly covered type guards in Chapter 2, What is New in TypeScript 3, when we learned about the unknown type. We look at these in more detail in this chapter.
Generics are a TypeScript feature that many libraries use to allow consumers to create strongly typed apps with their library. React itself uses it in class components to allow us to create strongly typed props and states...