We figure out the right way to send state setting actions to nested components. As well as how to wrap html elements with all the appropriate properties using DetailedHTMLProps.
00:00 Introduction
00:59 Typing useState as props
03:48 Using ReturnType
06:40 DetailedHTMLProps
09:50 Adding custom props
11:14 Outroduction
Types: https://unpkg.com/@types/[email protected]/index.d.ts
Code: https://github.com/jherr/no-bs-ts/tree/master/series-1/episode-22
If you liked this video, buy me a coffee! https://www.buymeacoffee.com/bluecollarcoder
π What's my theme? Night Wolf [dark blue]
π What's that font? MonoLisa
π Jack is also on the React Round Up podcast: https://devchat.tv/podcasts/react-round-up/
π Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
π Discord server signup: https://discord.gg/ddMZFtTDa5
π’ Watch our other videos:
π Hacking your Github contribution graph: https://youtu.be/_ZQSPYDlk3U
π More Typescript videos: https://www.youtube.com/playlist?list=PLNqp92_EXZBIKO8lqN3089jgZUi-FUFXX
Thank you for watching this video, click the "SUBSCRIBE" button to stay connected with this channel.
#typescript #NoBSTS #react