Typescript for React Components From Beginners to Masters

2024 ж. 17 Мам.
160 826 Рет қаралды

Typescript is quickly becoming the industry standard for React development. Take your Typescript skills from beginner to masters level by learning everything you need to know about how to write components in React the right way.
Cheatsheet: github.com/typescript-cheatsh...
Code: github.com/jherr/ts-hooks
Hope you folks enjoy this!
👉 If you enjoy this video, please like it and share it.
👉 Don't forget to subscribe to this channel for more updates: bit.ly/2E7drfJ
👉 Weekly free newsletter: www.jackherrington.com/subscr...
👉 Discord server signup: / discord
If you liked this video, buy me a coffee! www.buymeacoffee.com/bluecoll...
💢 Watch our other videos:
💟 Hacking your Github contribution graph: • Hacking Your Github Co...
💟 Build a KK Slider Slider: • Build A K K Slider Sli...
Thank you for watching this video, click the "SUBSCRIBE" button for stay connected with this channel.
Subscription Link: bit.ly/2E7drfJ
#reactjs #typescript

Пікірлер
  • Quick tip for anyone watching this video in 2022 or later: The implicit children property was removed from the FunctionComponent & FC types in React 18. Using these types remains completely optional, but there is no reason to feel discouraged if you do.

    @JTRNSmedia@JTRNSmedia Жыл бұрын
  • From a designer perspective ... very smart to start things out with that outdoors intro. Not only is the video/audio clear, but you've set yourself apart from the competition with some originality. Well done.

    @billpliske@billpliske3 жыл бұрын
    • Personally I agree wholeheartedly! Cheers

      @vinceypincey@vinceypincey2 жыл бұрын
    • Yes, and no "WHAT"S UP GUYS!" ugh

      @doumkatekz@doumkatekz2 жыл бұрын
    • Agreed. Nice to not be looking at an IDE right off the bat. Very engaging

      @shlemekian@shlemekian2 жыл бұрын
  • This is fantastic! Thanks! I've been using FC on all my components didn't know this was the old way of doing it.

    @mervin9220@mervin92203 жыл бұрын
  • Changed my thoughts on creating robust components. Thanks.

    @dev-suresh@dev-sureshАй бұрын
  • Thank you, Jack! I've been struggling with TS + React at my new job but this helped me so much!

    @todaysrapsux123@todaysrapsux1232 жыл бұрын
  • Just wanna say I am a huge huge fan of your React/TypeScript content. Subbed and can't wait for more :)

    @richardwang3541@richardwang35413 жыл бұрын
  • coming from Mr.Brad's channel, I think you are a very great teacher. Thank you for spending a lot of effort on your videos.

    @thanhnguyenhoai2727@thanhnguyenhoai27273 жыл бұрын
  • Thanks, Jack! Your TS React content has gotten me up to speed very quickly.

    @firebird77@firebird772 жыл бұрын
  • I binge watch all these video, very less people are lucky enough to have such a vast library of premium information.

    @arihantjain8347@arihantjain8347 Жыл бұрын
  • Thanks a lot! Your tuts are great and I really appreciate your well structured and calm way of explainig! 😀👍

    @DennisHorn1981@DennisHorn19812 жыл бұрын
  • Thank you so much for this Jack, I greatly appreciate this and really enjoy your content!

    @stevensalomon64@stevensalomon642 жыл бұрын
  • new sub - great content. Just making another trip around to try out React, but wanted to learn it with Typescript. It's surprisingly hard content to find (done correctly)! Thanks!

    @slikk66@slikk663 жыл бұрын
  • Jack is like the David Attenborough of coding with a dash of Ron Weasley's magic

    @jermainebrayne437@jermainebrayne4372 жыл бұрын
  • One of the best explanations here, I watched many videos in youtube, but Jack it's the best!

    @martinemanuel8239@martinemanuel8239 Жыл бұрын
  • perfect timing. thanks Jack

    @thehaptiK@thehaptiK3 жыл бұрын
  • I'm back again to repeat myself and say I loved it!!!

    @Iyiola@Iyiola3 жыл бұрын
  • Thanks for the video Jack, very clear and easy to follow.

    @1235niki@1235niki3 жыл бұрын
  • This video is great! Learned so much and I'll be putting this on my work right away!

    @jeremydeveloper32@jeremydeveloper322 жыл бұрын
  • I learned a lot out of this video! Thanks a lot, Jack...

    @arianh@arianh8 ай бұрын
  • Clear and to the point .Thanks :) Loved the function passed as children.

    @jsricochet@jsricochet Жыл бұрын
  • Starting a new job with React & TS! This will help a lot :)

    @geekySRM@geekySRM3 жыл бұрын
  • Each video I watch my react game lvls up, thank you!

    @tendies@tendies2 жыл бұрын
  • Number One in KZhead! For me its so usefull

    @learningit2572@learningit2572 Жыл бұрын
  • Outstanding! Really clear presentation.

    @stephancasas@stephancasas3 жыл бұрын
  • Awesome video Jack, very useful. Subbed :D

    @mauriciolucero7296@mauriciolucero72963 жыл бұрын
  • Subbed! Love this video so much, looking forward to more ts/react videos from you. May I ask if there is a repo for this video?

    @ft12341@ft12341 Жыл бұрын
  • This was a sweet lesson. Thank you, just subscribed.

    @alancosta6438@alancosta64382 жыл бұрын
  • I've been waiting for this one thanks

    @matthewzecchini9951@matthewzecchini99513 жыл бұрын
  • Very nice intro to the render props pattern!

    @dev_el1277@dev_el1277 Жыл бұрын
  • Thank you for sharing this amazing content for free^^ LOVE IT

    @reinaogo7161@reinaogo71613 жыл бұрын
  • Thx for your work , Jack!

    @user-gh6tc1bf9h@user-gh6tc1bf9h2 жыл бұрын
  • Loving all the typescript!

    @DedicatedManagers@DedicatedManagers3 жыл бұрын
  • You are awesome! Loved that video! The generic one just set my mind on fire

    @chenvarsano200@chenvarsano2002 жыл бұрын
  • it was amazing to learn, i was looking for it thanks for sharing

    @nirvanacore5543@nirvanacore55433 жыл бұрын
  • Thank you for making this, helped my understanding a lot! ;)

    @anders8638@anders86382 жыл бұрын
  • Thank you ..Learned so much about typescript in this video. Great explanation.. Will be checking out your other videos too.

    @ankitmehrotra8519@ankitmehrotra85193 жыл бұрын
  • love your teaching man...Well done

    @staefoded@staefoded2 жыл бұрын
  • Thanks for the content, I liked your vscode theme!

    @yusuphh.kajabukama4029@yusuphh.kajabukama40293 жыл бұрын
  • Great content as always. Keep it up

    @ryank9719@ryank97192 жыл бұрын
  • I’m new to your channel! This was awesome! Well Done! Btw i really like your micro frontend videos 👍

    @michaelangelosilva1337@michaelangelosilva13372 жыл бұрын
  • Thanks for inviting 90s Brad Pitt to give the video intro (those mannerisms 😂). Really appreciate your clarity and pace.

    @adventurer2395@adventurer2395 Жыл бұрын
  • I was just looking up videos on this yesterday and so I smiled when I saw this today!

    @omar99ize@omar99ize3 жыл бұрын
  • Sir this is really great content! Keep it up!

    @alinazar7998@alinazar79983 жыл бұрын
  • 22 minutes into the video, I subscribed

    @subhashmalireddy8211@subhashmalireddy82112 жыл бұрын
  • Just incredible. I love your videos.

    @OSCAR-CH@OSCAR-CH2 жыл бұрын
  • thanks for the video Jack!

    @jackcb@jackcb3 жыл бұрын
  • Honestly the best and easiest entry for me to start React with Typescript! Good Explanation, keep it up

    @stefanbrunner1591@stefanbrunner15912 жыл бұрын
  • Excellent video. I like your style and pace. Sub.

    @ragnarlothbrook8117@ragnarlothbrook81173 жыл бұрын
  • Thanks for your clear explanation, its really helpfull for me learn ts using react😃

    @kadekwijaya5332@kadekwijaya53322 жыл бұрын
  • Thanks a lot for the video, pretty much understood all the concepts you explained.

    @dmcshehan@dmcshehan Жыл бұрын
  • I see many awesome developers in youtube but You'r explanation and way of teaching is very awesome. Your content is so unique I can't find this content on whole you tube. I just have a just one request if you have a time so please make a one dedicated video on React, Redux toolkit, React Query with Typescript

    @usamasaleem5624@usamasaleem5624 Жыл бұрын
  • thanks a lot Jack, please make more videos 😍

    @zdargahi@zdargahi2 жыл бұрын
  • My favorite typescript coder.

    @r0x304@r0x3042 жыл бұрын
  • Great! Keep em coming

    @william3588@william35883 жыл бұрын
  • You, sir, are my savior.

    @AxelRTas97@AxelRTas973 жыл бұрын
  • Really valuable. Thank you.

    @tolulopemalomo8922@tolulopemalomo89222 жыл бұрын
  • Hats off Jack... thank you sir (:

    @zathkal4004@zathkal40043 жыл бұрын
  • Explained very well

    @asgharibraheem8938@asgharibraheem89383 жыл бұрын
  • Good video! Thanks for sharing it.

    @SwiftySanders@SwiftySanders3 жыл бұрын
  • Thank you, Sir, I have now seen a few of your videos, they are very informative.

    @rafael86ny@rafael86ny Жыл бұрын
  • learnt so much thank you!

    @HashtagObi@HashtagObi3 жыл бұрын
  • This is great, thanks!

    @Chrosam@Chrosam3 жыл бұрын
  • Interesting, what are the benefits of moving to split the item and list render like that? I'll read more on this online but curious if someone could point me in a direction.. After finishing the video, seems it benefits when placed in a component library or shared. Very cool.

    @jacksparr0w300@jacksparr0w300 Жыл бұрын
  • yours videos are seriously underrated...

    @viveksharmapoudel1657@viveksharmapoudel16573 жыл бұрын
  • I like Google Translator because your pronunciation is comfortable. So it gives me good information. One suggestion is, why don't we use a subtitle system for clear translation? 😀 Thank you for creating a good channel.

    @trustarMello@trustarMello2 жыл бұрын
  • Thanks for the great video!

    @Filipmalek1@Filipmalek12 жыл бұрын
  • Really Great!!!!

    @shivms8728@shivms8728 Жыл бұрын
  • Hi, what font style and vscode theme are you using in this video? the colors are appealing to the eyes and the fonts are easier to read than the default ones.

    @aldrindelica8989@aldrindelica8989 Жыл бұрын
  • your voice is so clear damn, your channel is under rated.

    @Viralvlogvideos@Viralvlogvideos3 жыл бұрын
    • Longer videos should help.

      @MaksymMinenko@MaksymMinenko3 жыл бұрын
  • This channel is too good

    @johnddonnet5151@johnddonnet51512 жыл бұрын
  • Khooool. Thank you

    @nekoresOfficial@nekoresOfficial Жыл бұрын
  • This video is definitely not _smartphone friendly_ ... but it is really interesting so I had to come to my computer and wow this is definitely made for my 1080p the colors are amazing but the best is our beloved presenter... This Tutorialist is impressive (but you all know that already)... Just hope he can do videos no more than *15 lines of code* (with the terminal in a separate window)... So that I can watch while doing the dishes in my kitchen (I only have an iPhone)...

    @Luxcium@Luxcium Жыл бұрын
  • Better than a text book.

    @youtekdev8131@youtekdev81313 жыл бұрын
  • undefiiiined !! :)

    @josephwong2832@josephwong28322 жыл бұрын
  • Excellent content and attractive introduction, keep going man ❤

    @amershboul9107@amershboul9107 Жыл бұрын
  • Jack -- I noticed that your code editor is automatically linting in the terminal pane as you type. Is that a default of your editor or something you setup? Great video btw!

    @PSAGrader@PSAGrader2 жыл бұрын
    • I use Fig in the Terminal, and thanks for the compliment!

      @jherr@jherr2 жыл бұрын
  • Hi Jack, can you please cover HOC in React and Typescript. Great videos. Thanks.

    @sumitwadhwa8823@sumitwadhwa88232 жыл бұрын
  • Hi Jack! Great Content!!!! Please make video for Google map react along with typescript. Thanks

    @varshasharma7397@varshasharma73973 жыл бұрын
  • Very Nice tutorial

    @joelwembo@joelwembo3 жыл бұрын
  • Thanks for the tutorial. It was enlightening and I love your vscode theme too!! Care to share?

    @noramensah6638@noramensah6638 Жыл бұрын
  • Thanks!

    @thomasstambaugh5181@thomasstambaugh5181 Жыл бұрын
  • thank you for this video! What VS code extensions did you use in this video?

    @rachel2518@rachel25182 жыл бұрын
    • Just the TypeScript Extension Pack - marketplace.visualstudio.com/items?itemName=loiane.ts-extension-pack

      @jherr@jherr2 жыл бұрын
  • hi at 19:30 how can I use this using arrow function? (syntax), Thanks

    @haseebiqbal4140@haseebiqbal41402 жыл бұрын
  • Jack you are my favorite dev youtuber, between traversy, fireship and the rest. However, it would help me if you added more context in the usage examples. Here you do a good job showing the code examples but I would love to hear more opiniated....opinions about WHEN to do these and why I need to keep them in the back of my head. Thanks so very much!

    @ToddDunning@ToddDunning2 жыл бұрын
    • Fair enough. Point well made and taken.

      @jherr@jherr2 жыл бұрын
    • @@jherr OK now to continue my all-week marathon of your vids until my head hurts.

      @ToddDunning@ToddDunning2 жыл бұрын
    • @@ToddDunning Enjoy! Not sure if that beats The Green Knight that I just saw. Sheesh, that was an overrated snooze fest.

      @jherr@jherr2 жыл бұрын
  • We are so fortunate to have an innovator like you: btw can someone tell how many times he says cool in this video? 😍

    @Fatima-ie5kj@Fatima-ie5kj3 жыл бұрын
    • Now you're making me self-conscious about my 'So's, 'Alright's, and 'Cool's. ;)

      @jherr@jherr3 жыл бұрын
  • Hi thanks for the video, it was really helpful! at 21:31 I'm getting this error Type '{ children: never[]; items: string[]; render: (item: string) => Element; }' is not assignable to type 'IntrinsicAttributes & { items: string[]; render: (item: string) => ReactNode; }'. Property 'children' does not exist on type 'IntrinsicAttributes & { items: string[]; render: (item: string) => ReactNode; }'.ts(2322) when I'm reloading the page I'm able to view the page without an error for a second and then I'm getting this error. Can anyone please help?

    @Sammorris207@Sammorris2073 жыл бұрын
  • Looks cold.

    @rileydavidjesus@rileydavidjesus2 жыл бұрын
  • In recently ran into a usecase where I wanted to do something similar to your example with the generics. But I wanted the ensure that instead of any ListItem type, the ListItem type should be either MyCustomType1 or MyCustomType2. How would you implement that in your example?

    @bobvantpadje1490@bobvantpadje14903 жыл бұрын
    • You should be able to say `T extends MyCustomType1 | MyCustomType2`, maybe? Certainly you can do it with one. If that doesn't work then `T extends { /* the fields I require */ }` which might be the better way to go anyway since it identifies the fields you actually care about as opposed to the specific types you care about.

      @jherr@jherr3 жыл бұрын
  • Hi Jack, can you share your VS Code configuration?

    @martingalli3553@martingalli3553 Жыл бұрын
  • Great content 👍👍...using context with reducers in typescript...maybe a topic for the future ?

    @pranjalwalia3810@pranjalwalia38103 жыл бұрын
    • I'll do that next since I think Typescript around React was a big missing piece of content for me.

      @jherr@jherr3 жыл бұрын
    • @@jherr i'd personally love to see a series of typescript/react subtopics like this. context/redux/graphql etc... all whilst using typescript. might really help people like myself transitioning from javascript to typescript in their create-react-app/lications . cheers.

      @thehaptiK@thehaptiK3 жыл бұрын
  • Thank you, Jack, I appreciate your Videos. very nice, I'm making the transition to TS, b💩😎

    @bythealphabet@bythealphabet2 жыл бұрын
  • @00:43 wo wooo whats happening with my browser!!

    @sumanth3036@sumanth3036 Жыл бұрын
  • Great video... was not cold outside for short sleeves? LOL Thanks

    @iqwebserve3973@iqwebserve397311 ай бұрын
  • Thank you Jack, by the way, you'll make a great candidate for US presidency. You remind me one of them. You have a great personality and necessary problem solving skills as a programmer.

    @anvarsaidov8964@anvarsaidov89642 жыл бұрын
  • Would you recommend using interfaces or types to define props? The cheatsheet recommendation is to use interface til you need types, so wouldn't just using types making everything more consistent for the long run?

    @adventurer2395@adventurer2395 Жыл бұрын
    • There are who says you should use interfaces when coding class oriented programming and types when doing functional programming, but it doesn't really matter since currently their difference are minimal. I used to like using interfaces, but type being more flexible I'm starting to change.

      @AmodeusR@AmodeusR Жыл бұрын
  • Hey Jack, I know you can define a useState like useState() and that will infer what are the differences between null and undefined?

    @danielkeefer1901@danielkeefer19012 жыл бұрын
    • That's a great question. Undefined in this case means "I didn't give you a value of any kind". Where null would mean; "I gave you a value, a value that was the no-value value." So in this useState case it's a choice between the number, and there not yet being any value at all.

      @jherr@jherr2 жыл бұрын
  • I believe that usually when you consume a function of generic type (not sure if I’m saying that right) you need to specify the type. At 20:57 when you consume The component that is of generic type you discuss how list item is of type string. Is the type on the List component inferred?

    @DedicatedManagers@DedicatedManagers3 жыл бұрын
    • It's inferred from the type on the array you are passing in. So it's totally transparent to the end user of your component. You give it a list of strings, and your render function then takes a string. etc. etc.

      @jherr@jherr3 жыл бұрын
  • Hello sir, I think the GitHub repo link is wrong....I can't find the code you have shown here. Can you please verify and update the link?

    @satyamktr@satyamktr2 жыл бұрын
  • thanks

    @daviddrahllensa4165@daviddrahllensa41652 жыл бұрын
  • Hi Do you Have any Course on React with Typescript??? As Typescript is growing more and more day by day, Each and every Company Asking REACT with Typescript Combination.. Can you please Release and End to end Course on React, Redux with Typescript please..

    @sundeeppeethala312@sundeeppeethala3123 жыл бұрын
KZhead