Extracting React Props using CONDITIONAL TYPES - Advanced TypeScript

preview_player
Показать описание
Become a TypeScript Wizard with Matt's upcoming TypeScript Course:

Follow Matt on Twitter

Рекомендации по теме
Комментарии
Автор

nice, one thing i see said often is that typescript has a weird type system. it's true, coming from Rust or Elm feels weird but when you see it applied to something like React it makes perfect sense!

flbn
Автор

Useful to know how this is done. But this does already exist: ` React.ComponentProps ` does the same thing.

sheldonfrith
Автор

Found ur video while looking for my question - how to implement 'as' prop in react. But currently I am stuck with JSX.IntrinsicElements (like 'button', 'a', 'p'). U can take that as a video idea, lmao

polioann