DEV Community

Discussion on: 5 Typescript utility types, that will make your life easier

Collapse
 
nosyminotaur profile image
Harsh Pathak

I've used the first 3 a lot when creating prop interfaces in React. There are a lot of scenarios where you need to extend from a base interface and sometimes you require the properties of the base interface to be optional. And sometimes you need just some of the properties of the base parent. Typescript utility types make this process a lot easier.
Although, I've never used Record. I've seen it in Mui but not used it in my own code. Seems handy, thanks!

Collapse
 
glebirovich profile image
Gleb Irovich

React with typescript is awesome, especially once you manage to properly type HOCs 😂