Typescript Generics Tutorial
HTML-код
- Опубликовано: 25 авг 2019
- Learn how to use generics in Typescript. I go over how to use them in your React.js code and create your own in functions, interfaces, and jsx.
#typescript
Code: github.com/benawad/typescript...
----
Follow me online: voidpet.com/benawad
#benawad Наука
One of the best tutorials on Generics I have ever watched. Thank you Ben!
Not for beginner though, while I was watching this I could see the useful parts, but some times I just didn't get it (most parts in React part) ... I will read and fully undertand their full important, I won't give up.
@@edwingarcia5043 The generics explanation was very good, you're probably lacking other information needed to understand the code, I recommend revisiting more basic concepts of programming before jumping into this.
@@georgestan9563 No it was clearly noting to do with the basics of programming and more about him not understanding how React and Formik works. I think he pretty clearly said that in his comment. Which BTW is quite irrelevant for him unless he want's to use either of those, this was just more of showing a practical example for people who are familiar with React and Formik.
He's an asset in the JavaScript community
Was about to say the same thing. No nonsense, really clear and focused!
Mad props for making this. Found that the docs were pretty lacking when it came to generics and this really cleared things up. Been using TS for a while now but still found this super helpful
This video legit dropped right when I was reading Typescript docs
to return the tuple you can also assert `as const` at the end of that function
Yes, that might be another way but the disadvantage will be that typescript will not allowed to push more values in returned array as we declare it as ready-only via const.
Or u can use keyword readonly.
Really good as always, Ben! I've been using TypeScript for a while now, but I still learnt a lot from this video! Thank you.
Thank you Mr. Awad for the short, concise, and elegant explanation of generics.
I've been youtubing and googling for over an hour trying to wrap my head around generics. The first 5 minutes of your video did a better job than all the other videos and articles and documentation. Kudos, and thanks!
Great video! I’m so glad that you used example functions other than an “identity” function that just returns the argument. It’s much easier to understand when you can infer how the thing it’s doing is something that could be useful.
Thank you so much for this tutorial, i have been scratching my head trying to figure out how generics work in Typescript, and this video pretty much cleared it up for me.
I love this.... Just started rewriting an open source library of mine in typescript and this was just what I needed. Thanks @Ben Awad
Thanks dude, I'm studying for a week, but this video clears all the doubts, you're rock!
The video was really quickly but you give the concepts clearly and concise, thanks, man
I can't count how many times I've use a Ben's video to settle a discussion :D Thank you for the all awesome content! Inspiring programming style, using TS at it's best, always!
I read few blog posts about generics and thought I am too stupid for that but your explanation made me understand everything I struggled with before. Thank you
By the way ur killing it my dude. Keep grinding your in your way
You have the best tutorials on RUclips. Thanks so much!
Your videos are always great. Thanks Ben. You explain everything really well.
This made generics so much easier to understand! Thanks for making this video 👍
Yo!!! This is the best explanation on generics. I especially love the jsx example. Awesome stuff 🔥🔥
Best generics explanation i found on youtube so far. Thanks.
Can't expect better explanation than this. Thanks Ben.
I started reading about typescript today and this is better than the docs. thank you
Thanks Ben,
Please keep making videos like these on Typescript
- The best generics tutorial I've ever watched!
Ben Awad the boss of coding on youtube and some of the best explanations that I have seen.
This video is really great to start with typescript generics
Thanks Ben for the clear explanation, I adore your videos and always recommend it to people at my company!
thanks, that's awesome!
This is the best generics tutorial on RUclips
this the best typescript tutorial video i have ever watched, thank you
dopest video ever. i always come to this when i forget generics. this video alone is 80% typescript
This was an amazing exposition of generics!
Huge thanks! Great explanation, Ben.
This tutorial cannot be free! Thank you so much :)
Thank you, Ben
Your tutorials are great
absolutely brilliant tutorial, thanks!
Thank you! Really clear explanation.
Thank you so much, for your great Generics tutorial.
This helped me alot. Thanks Ben.
Excellent video, learned a lot.
This is really nice tutorial, keep it up Ben!
Finally I understand generics. Thanks!
At 19:37, it seems to be some sort of parsing error which mistakes for JSX instead of a TS generic. You don't necessarily have to "extend" something to get the parser to realise it's a TS generic -- a simple would work as well.
Great video, Ben!
I was running into the exact same error at 4:16 too! Thanks man
Thanks Man
Thanks for the great videos. Keep up the good work 👍🏻
Man, this is amazing stuff! Thank you bro
Great way to explain things. Thanks Ben
Thanks bro. I was look for interfaces that implement generics just right now
Great content. Keep up with the good work.
Awesome video! Helped me alot, thanks!
Great video. Really liked how you included some React as well.
Still relevant in 2024, thanks a lot Ben :)
this is why i love typescript
nice one! just what i was looking for.
Thanks. 3 new uses for generics
This's a awesome tutorial
Thanks man, it was clear and concise.
Awesome tutorial 🔥
Very good intro to typescript!
Thank for the video! Very useful!
very great tutorial, now i understand Generics ❤
Thank you Ben! Now I can refactor my project better.
You are awesome Ben!!!!!! 🙌
Thanks man, this really helpful!
This was an awesome video sir. Thank you for this
Thanks for this video it really help and simple to understand typescript generics
Great tut! Thank you!
Great video Ben 👍
Love it, thank you, man!👍
really good explain Typescript Generics..!👍
As a developer we always look for short video but better to explain. you did good job to explain and that what i like about this video.
I just love that you're using Vim.
thank you. this video is very helpful.
Amazing work man thanks
i miss these kind of videos @Ben
thx ! had been learned a lot
Just got into Typescript pretty hard about a month ago. Was always confused what the
useful and clear tutorial, thx =)
Thanks, great explanation
Do you have a video explaining why we must use “as” to assert types instead of the form in JSX? I noticed this mentioned in the typescript documentation, but it wasn’t clearly explained what was meant by it.
I was looking for something more deep and complex about generics, like type creation based on objects or enums or any more complex examples, since I m a experiment programer in TS, but it has some interesting concepts, coodles!
I'll have to do a more advanced tut at some point :)
Ben, to get the most out of your videos, one must already be familiar with the concept
Aaaand... that's it? xD Man, I was watching others trying to explain it like it was some sort of a rocket science. Thanks!
Thanks Ben!
Would love to see a video on using Typescript with Svelte 🤩
Stop using stelve
Awesome video!
Very nice and helpful
This is awesome.
Great video.
Nice, Really Good
Loved it.
thanks great tutorial
WOW!!! I could kiss my screen right now!!
Ben you beautiful mind you!! Thank you, I understand Generics now!
This will take some time to digest.
This is a good ass tutorial!
awesome. thank you :)
At 19:43 Line-18, you don't _have_ to write ** instead write it as ** notice the comma after T
thanks
Greate video thanks👍
Wow! amazing ... I just realized its Parametric polymorphism
thank you!!
Thanks for thie video.
Holy cow bro. Noice. Ty.
Отличное видео, спасибо!