Type component props, events, children, refs, reducers, and custom Hooks with TypeScript. Use unions and generics to make invalid component states harder to represent.