React Typescript Tutorial

Поделиться
HTML-код
  • Опубликовано: 24 июл 2024
  • Learn how to start using Typescript in your React code. I go over props, hooks, and render props.
    #react #typescript
    Snippets: gist.github.com/benawad/1e9dd...
    Code: github.com/benawad/react-type...
    For more information on this checkout: github.com/typescript-cheatsh...

    ----
    Follow me online: voidpet.com/benawad
    #benawad
  • НаукаНаука

Комментарии • 418

  • @NychroneIB
    @NychroneIB 4 года назад +709

    Subbed. Finally, a dev tutorial that actually shows TS in context RATHER than foo bar baz and mythical one off instruction scenarios.

    • @bawad
      @bawad  4 года назад +65

      welcome :)

    • @danm2756
      @danm2756 3 года назад +24

      This dude actually seems knowledgeable. Not just trying to get views using buzzwords, talking about top lists. As an applications developer, I approve!

    • @pearlsswine
      @pearlsswine 3 года назад +18

      Don't forget: "Today, we're going to learn TypeScript with React. Okay, let's import Bootstrap and waste 15 minutes copying and pasting boostrap code for a toy project"

    • @exgc12
      @exgc12 3 года назад +6

      @@pearlsswine When I was trying to learn Node.js I always hated that most tutorials were like "Learn how to make a Node server.....which includes these 20 obscure packages that will confuse you"

    • @rizqyhbb
      @rizqyhbb 2 года назад

      Loled

  • @robbieyy
    @robbieyy 4 года назад +20

    Super! Exactly the issues I ran in to after a day of trying to use React TS... Thanks a lot.

  • @SayanMondal342
    @SayanMondal342 4 года назад +4

    I really like how he touches all the important things which are really the foundations to being a better developer. Looking into the definitions, understanding the function signatures and also using hooks for the example. Amazing! I'm happy I got this as a recommendation.

  • @liamdavis492
    @liamdavis492 4 года назад +109

    Typescript seemed so intimidating and you just made it relevant and simple within the context of my current knowledge. thank you so much

  • @ozanmuldur4565
    @ozanmuldur4565 3 года назад +5

    You are the man dude, people made video to explain what you doing in 3 hours, respect !

  • @LeetCodeSimplified
    @LeetCodeSimplified 3 года назад +162

    _Timestamps:_
    00:00 *Introduction*
    -- 00:36 Setting up a Project
    -- 01:15 Project Overview
    01:39 *Props* (Declaring Components and Passing in Props)
    -- 02:29 Using Interfaces
    -- 03:40 Data Types
    -- 04:35 Passing in Interfaces
    -- 05:20 Optional Props
    06:31 *Hooks*
    -- 06:34 useState
    ---- 07:04 Unions (Multiple Types)
    -- 08:47 useRef
    ---- 09:27 HTML Input Element
    ---- 09:50 Pro Tip (Hover Technique)
    ---- 12:14 HTML Div Element
    ---- 12:41 onChange
    -- 14:36 useReducer
    ---- 15:03 Passing in Types
    ---- 16:14 Arrays
    17:41 *Render Props*
    -- 17:54 File Names
    -- 18:20 User Snippets
    -- 22:20 Pro Tip (Examining Types)

    • @tekk7989
      @tekk7989 3 года назад +1

      Thank you so much for the timestamps!!

    • @LeetCodeSimplified
      @LeetCodeSimplified 3 года назад

      @@tekk7989 You're welcome!

  • @pelinkayhan
    @pelinkayhan 4 года назад +7

    Before that video I was lost for the documents and I was looked at the code which was given me. Now I'm able to understand.Thanks a lot.

  • @0v3rwh3lm3d
    @0v3rwh3lm3d 4 года назад +7

    Ben, you're awesome, mate! Hats off to you for amazing and useful tutorials, I really enjoy them and take a lot of useful stuff for my work. Again, thank you!

  • @chriszhang3629
    @chriszhang3629 4 года назад +13

    Please keep doing what you are doing now, you're really amazing!!

  • @liftingisfun2350
    @liftingisfun2350 4 года назад

    You are a fantastic teacher, I appreciate most that you explain every detail, even when you mess up and why and even why it was important at all. Thank you

  • @yogajourney9519
    @yogajourney9519 2 года назад

    I'm currently migrating a project over to Typescript. Less than 3 minutes into the video you've already helped me fix my issue. Thank you!

  • @ameliamargaurite3150
    @ameliamargaurite3150 3 года назад

    Omg, 6mins in and I'm sold. I just started my first web dev job and they're using React with Typescript. Never used Typescript before and this just cleared up so much of what i wasnt understanding in their code. Thank you!

  • @nirvanacore5543
    @nirvanacore5543 3 года назад

    this was the most refined react typescript tutorial I got. helped a lot for learning typescript in react, thanks for sharing

  • @farbodshabani8398
    @farbodshabani8398 Год назад

    I am actually surprised. This video is 4 years old and still you can use it. I definitely recommend this video if you want to have a little glance at how TS work in React world. I truly enjoyed it.

  • @nengdeveloper7133
    @nengdeveloper7133 2 года назад +6

    I can't believe so much can be covered in less than 25 minutes. Love the straightforward explanation of important concepts + tips&tricks in TS.
    Thanks for this!

  • @Sindoku
    @Sindoku 3 года назад

    You have extremely natural teaching talent. I can just tell. Thanks for the great video.

  • @recycletv7145
    @recycletv7145 3 года назад +2

    Geezzz days of tutorial converted in 30mins on this video... Thanks Ben!

  • @a999haa
    @a999haa 3 года назад

    Appreciate the just about enough tutorial that one would need as an experienced React dev wanting to get into Typescript!!
    Great video !

  • @ankitmehrotra8519
    @ankitmehrotra8519 4 года назад +1

    Hey Ben,
    I am loving all your videos and going them one by one. The best thing about is the speed and also the way of explaining everything so wonderfully well.. Great going and yes I would also like you to make a unit testing videos covering JEST enzyme with snapshot testing..

  • @JordanRhea
    @JordanRhea 4 года назад +8

    This video came at the perfect time. Very clearly explained!

  • @haiderimam8977
    @haiderimam8977 Год назад +1

    It’s just hard to believe how much knowledge this man can deliver in how little words. What a concise way of teaching. Such is the caliber of Ben awad, actually I’m quite surprised he haven’t developed a unicorn company yet as he often discuss in his videos. Anyhow thanks for the video, and please start making these knowledge sharing videos again.

  • @chengxiaoxia8046
    @chengxiaoxia8046 Год назад

    Thanks Ben. Your course is amazing. Both motivational and inspirational. I learnt a lot of things in less than 2 hours. Now I begin to update my React project in JavaScript to NextJS + TypeScript. Thanks again.

  • @stevereid636
    @stevereid636 4 года назад +12

    Brilliant! This is just what I've been looking for👍🏾

  • @michaelantoni8323
    @michaelantoni8323 3 года назад

    I just finished learning TypeScript and wanted to implement it to my react app, its very neat and easy to understand Thank you.

  • @spongechameleon6940
    @spongechameleon6940 3 года назад

    Bruh your videos are the only ones where I don't have to watch at x1.5 speed. More than enough content coming my way. Thank you.

  • @notreal8973
    @notreal8973 Год назад

    Finally, a perfecttutorial for me! I already know typescript and react but needed someone to show me how to combine the two!

  • @kiddchaos-titans
    @kiddchaos-titans 4 года назад +2

    You are very good at explaining the syntax! Thank you!

  • @pashamachuca5900
    @pashamachuca5900 4 года назад

    Amazing Tutorial. I really enjoyed the way you explain and also the glimpses into shortcuts

  • @viktoriianosova136
    @viktoriianosova136 3 года назад

    Thanks! I've just started with Typescript and this tutorial answered a lot of questions

  • @kevinmarmet
    @kevinmarmet 2 года назад

    Fantastic. I’m a Senior dev getting into TS shockingly late lol and this helped answer some questions for me. Especially the hover tip, always wondered where some of the types came from other than Google lol

  • @hectorjimenez7031
    @hectorjimenez7031 2 года назад

    Some of the best web dev content is found on this channel! Thanks a lot for your awesome explanations

  • @detaaditya6237
    @detaaditya6237 3 года назад

    An actually decent explanation of the benefits of using TypeScript with React. Thank you!

  • @vs.cristian
    @vs.cristian 4 года назад +168

    Great video!
    Could you make a tutorial about unit testing react

  • @lotro234
    @lotro234 Год назад

    Great tutorial, loved how condensed and informative it was. Also pro tips are great

  • @albinoiiicordova4811
    @albinoiiicordova4811 3 года назад

    Thanks Ben! Straight to the point and very practical tutorial. Appreciate it!

  • @LeviXIII
    @LeviXIII 4 года назад

    Great, simple tutorial! Thanks for using a range of examples.

  • @Dizzifer9538
    @Dizzifer9538 Год назад

    So much information under 30 minutes. Love it...

  • @VietNguyen-px3oz
    @VietNguyen-px3oz Год назад

    this youtube channel is pure a gold-mine. Thank you so much

  • @arunramachandran2801
    @arunramachandran2801 3 года назад

    Great video. This is exactly what I was looking for when I started learning ( maybe many more people as well ) Typescript with React.

  • @Shakeel714
    @Shakeel714 3 года назад

    Excellent explanation of React-TypeScript. Thanks Ben Awad, you are a cool teacher.

  • @iahonz
    @iahonz 3 года назад

    Glad I watched this only just after I *recently* started a new project, easier to convert from js to ts!

  • @lewissherlock6777
    @lewissherlock6777 4 года назад +1

    Awesomely helpful video. Thank you for creating this and sharing your knowledge, borther!

  • @darwyna
    @darwyna 4 года назад +8

    Thank you for this! Wish I could like this video more than once:)

  • @gergelykontra7273
    @gergelykontra7273 3 года назад

    Don't be fooled by the young face of the speaker. This tutorial has very high quality! Many thanks for sharing.

  • @oceanbacon2896
    @oceanbacon2896 2 года назад

    This guy is legit, the way he explains stuff is amazing.

  • @christopherjohn5674
    @christopherjohn5674 Год назад

    less words, but all knowledge has been covered,thx very much bro

  • @TheTenThousandThings
    @TheTenThousandThings 2 года назад

    This is such a helpful, high density video, ty

  • @azs06
    @azs06 4 года назад

    Concise and to the point, excellent tutorial.

  • @battmarn
    @battmarn 3 года назад

    gotta love being at the skill level with typescript that you work with it professionally but still learn stuff from a starter tutorial like this

    • @sujeewarathnaweera
      @sujeewarathnaweera 2 года назад

      Gotta love seeing a *supposedly* professional programmer *trying* to beat the system by writing the *same comment multiple times* and RUclips *display them together* , adjacent.

  • @hvuupadhyay5418
    @hvuupadhyay5418 3 года назад

    Thanks! I appreciate your efforts! Really a great video if you wanna migrate to typescript-react from plain react

  • @harik1000
    @harik1000 3 года назад

    That's awesome. explained with simplicity. *Signed in* just to like the video.

  • @aliasgar.burhani1099
    @aliasgar.burhani1099 2 года назад

    the accent and the sound quality of ben awad makes it soothing to hear

  • @floroz87
    @floroz87 4 года назад

    really good tutorial, clear and straightforward.

  • @mikeyura
    @mikeyura 4 года назад +1

    I like this tutorial, you have a nice style of explaining

  • @albin1568
    @albin1568 3 года назад

    love u ben. this should be the first thing on typescript website.

  • @Luxcium
    @Luxcium 4 года назад +2

    Wow 😮 I really enjoy your videos keep up the good work bro !!!

  • @renepromesse7410
    @renepromesse7410 3 года назад

    After watching this video, it took me 2minutes to fix the error that I had been facing since January 🎉🎉

  • @priyasheth4477
    @priyasheth4477 4 года назад

    Great Video! I am new to React, TS and this is what I was looking for :)

  • @mahtube735
    @mahtube735 2 года назад

    Thank you. I was looking something for my buddies...
    Thank you

  • @sametmutevelli
    @sametmutevelli 3 года назад

    Awesome tutorial for starters like myself. Thanks!

  • @kal9421
    @kal9421 2 года назад

    Ben, you should become an instructor, You are one of the best I have seen.

  • @dannytv5434
    @dannytv5434 3 года назад +2

    You can just use the tsrafc snippet instead of creating a custom one for the TypeScript React Arrow Function Component. It's basically identical and comes with the ES7 React snippet extension from dsznajder, which most use already anyway.

  • @KrisFoster1
    @KrisFoster1 3 года назад

    Great consise video that gets straight to the point, thank you!

  • @a.anvarbekov
    @a.anvarbekov 2 года назад

    thank you for telling Ctr + Space, i was looking for that

  • @gravelessForever
    @gravelessForever 3 года назад

    Ben Awad, you're my new favorite youtube coder

  • @samjack6253
    @samjack6253 2 года назад

    That was quite helpful Ben 🙌

  • @mahdiboughanmi6781
    @mahdiboughanmi6781 2 года назад

    This man here deserves millions of subscribers

  • @travianfreak1
    @travianfreak1 4 года назад

    Nice Video, keep up the good work. Was just starting out with TS :)

  • @alirezataleiasl5712
    @alirezataleiasl5712 4 года назад

    one of the few fellows you need to follow to get a good job or keep your current one :D

  • @ruhulamin1741
    @ruhulamin1741 4 года назад

    I love you man! appreciate what you're doing.

  • @ougininja8412
    @ougininja8412 Год назад

    the CTRL + Space is amazing

  • @muhamadivan3956
    @muhamadivan3956 4 года назад

    thanks ben this is a really helpful tutorial for me

  • @golansoffer6538
    @golansoffer6538 2 года назад

    Great video Ben, very helpful.

  • @jarryingnaut
    @jarryingnaut 3 года назад +1

    Thanks, ben for making my life easy 😊

  • @Obyvvatel
    @Obyvvatel 3 года назад +7

    For someone used to c# this just seems like a straight up improvement of js

  • @zeroph33r23
    @zeroph33r23 4 года назад

    Thanks a lot for this productive tutorial

  • @konstantinmodin6977
    @konstantinmodin6977 4 года назад

    Cool explanation, definitely will use hovering.

  • @Damixx111
    @Damixx111 4 года назад +43

    Thank you! Could you please do a video on using typescript with redux as well?

  • @RoyerAdames
    @RoyerAdames 3 года назад

    Just what I was looking for thank you.

  • @muha8598
    @muha8598 3 года назад

    This is an awesome tutorial. Thanks!

  • @igaimerca
    @igaimerca 2 года назад

    Very handy here, Thanks Ben

  • @muhammadmursalin8915
    @muhammadmursalin8915 3 года назад

    Very Nice explain the use of TypeScript with react.js

  • @ZawWLwin-jo7dc
    @ZawWLwin-jo7dc 3 года назад

    thank you, your videos are very educational

  • @__greg__
    @__greg__ 2 года назад

    Very helpful, thanks for sharing!

  • @ashutoshsinghchauhan7508
    @ashutoshsinghchauhan7508 2 года назад

    Amazing Bro ! Thanks for the tutorial !

  • @rei8306
    @rei8306 4 года назад +2

    Love this tutorial!

  • @christiantrinidad6619
    @christiantrinidad6619 4 года назад

    awesome video! Would love it if you can make another describing the differences between types and interfaces in typescript!

    • @bawad
      @bawad  4 года назад +2

      I actually don't know all the differences, what I do is use interface for objects and type for everything else

  • @JohnCamden
    @JohnCamden 4 года назад

    Maximum level helpfulness here.

  • @anabelly
    @anabelly 3 года назад +1

    This is exactly what I've been looking for. It's amazing that it's so hard to find a basic introduction to using Typescript with React. I thought there would be a ton of resources on this.
    I do have a doubt: when you're showing the useReducer hook I noticed that you use type and interface to define types. I've read they are similar (and that interface is preferred). Is there a reason behind the choice of type/interface for this?
    Thank you for sharing this!

  • @oscarchan5684
    @oscarchan5684 2 года назад

    Thanks! Really helps me a lot!

  • @narekmalkhasyan9636
    @narekmalkhasyan9636 3 года назад

    Great video! Thanks a lot for easiest tutorial.

  • @doaashafik3073
    @doaashafik3073 2 года назад

    Its just amazing video! ❤
    Thanks alot

  • @MariusMathisenVLOG
    @MariusMathisenVLOG 4 года назад

    Great job! Helped me out alot. :)

  • @albertflores4176
    @albertflores4176 2 года назад

    I hope this man doesn't hate Typescript and back again in JavaScript in future

  • @hayounglee5929
    @hayounglee5929 3 года назад

    Thank you! I love your video!

  • @anathemia1
    @anathemia1 4 года назад

    This tutorial is on point!

  • @mtcindianutube
    @mtcindianutube 3 года назад

    Thanks a lot, really helped me to understand. :)

  • @reedmacdonald210
    @reedmacdonald210 3 года назад +2

    Great tutorial! My last company used TypeScript and while I understand that it's meant to catch bugs before they happen, I always felt like debugging the TypeScript errors took longer than the bugs they were supposed to prevent. Anyone else feel the same way?

  • @erickloningo2252
    @erickloningo2252 4 года назад

    Thanks man. this was really helpful

  • @devdiedelta2706
    @devdiedelta2706 4 года назад

    Thanks BEN Great tutorial