Typescript documentation is hard to read. I want to re-write it in a way that is actually understandable by a casual reader. Let’s start with a component without generics, and introduce them only when we need them. We’re going to implement a page with a bunch of identical-looking selects for multiple categories.

7m read timeFrom dev.to
Post cover image
Table of contents
Intro💪 Time to refactorStrongly typed select - first attemptStrongly typed select - actual solution with typescript genericsTypescript generics in React hooks bonus

Sort: