Mar 20, 2021
Hey Paul,
Glad you enjoyed the article. Designing with generics is definitely a style preference, I tend not to use such heavy handed typing when writing most of my React code, this hook was an oddity because it became part of a pretty standardized toolset that I use across projects, so I like to have the autocomplete. I do agree however that there's a fine balance between safe typing and the bloated mess that seems to plague many larger Typescript projects.
Then again, I am only a first-year university student, so we'll see how that opinion changes over time.