Generic and polymorphic components
Comes up in: React, Coding
This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.
What it covers
- generic
List<T>/Select<T> - polymorphic
asprop and its typing cost - discriminated props (either
hreforonClick)
Words you will know
What you will practise
- typed
Select<T> Button | Linkunion props
Interview questions this answers
- How would you type a component that renders either a link or a button?