Reusable Component Props
Learn how the Omit and keyof utilities are used to provide a complete reusable component prop.
We'll cover the following
Here's a quick summary of how the Omit
and keyof
utilities work.
The Omit
utility
The Omit
takes in two generics. The first is an object type, and the second is a union of types we’d like to “omit” from the object type. Let's consider a Vowel
object type.
Get hands-on with 1400+ tech skills courses.