The React documentation should link to this video.
@day2dayja1103 жыл бұрын
That google listening to your thoughts and the algo working in the background lol
@TheSaintsVEVO3 жыл бұрын
This channel's videos aren't beginner friendly.. It only helps people who are already familiar with this stuff.
@rafadydkiemmacha75433 жыл бұрын
@@TheSaintsVEVO not in this case. This video is just a copy of the official (poor) docs.
@Zach-s5g3 жыл бұрын
@@TheSaintsVEVO not really. This video is much better. The docs is.. shall I say confusing
@jasonlough66403 жыл бұрын
@@TheSaintsVEVO If you find something you dont know, research it and come back. This applies no matter what level youre at. Id say a beginner would get more out of this video than an expert.
@RohitSharma-vq2gn3 жыл бұрын
Hours of react knowledge distilled in 10 mins. Felt like stealing. Thanks man, great work!
@key20103 жыл бұрын
ever noticed stolen things taste better than bought? ... except bricks... those taste the same
@astrophilo20002 жыл бұрын
facts, time is money bro that's the reason and we are lazy asf
@kimdev112 жыл бұрын
i really thought i would be learning react hooks in 1hr but this guy did in 10 mins, superb!
@WellActualllyyy9 ай бұрын
nice man i still don’t get it
@jeremey20726 ай бұрын
@@WellActualllyyy it will make sense eventually, just keep coding
@CodeSketched3 жыл бұрын
Learned more about hooks in this single video than all my attempts to learn about them over the past several years!
@rafadydkiemmacha75433 жыл бұрын
Interesting, because this video doesn't say anything more than the official guide.
@CodeSketched3 жыл бұрын
@@rafadydkiemmacha7543 you're right, but the official documentation never felt welcoming enough to read through all the hooks.
@rafadydkiemmacha75433 жыл бұрын
@@CodeSketched I completely agree and in my opinion, this video is not welcoming neither. One of the worst ones so far.
@shashikanthp31453 жыл бұрын
@@rafadydkiemmacha7543 MOVE ON Hater
@rafadydkiemmacha75433 жыл бұрын
@@shashikanthp3145 so it's not allowed to express opinions anymore, sheep?
@Surya-np1bb Жыл бұрын
When I wanna know about a topic and fireship has already made a video about it is the best feeling. This guy can concisely teach any topic.
@ImVengeance3 жыл бұрын
One thing alot of people miss is that on useState in the setter you can actually pass a function to get the prev state value you for say updating a counter which is the correct way. For example setCount(prevCount => prevCount + 1). if you where to call setCount and try modify the value based on the current count value the state would be modified based on the value at that render time. If you call setCount(count + 1) twice it would only infact increase the value by one as both calls would get the prev rendered value and overwrite each other. Hope this helps
@souvikchakraborty9900 Жыл бұрын
wow i knew that we should use prevcount but never truly knew what could go wrong if i didn't. Thank you man.
@KhiemKimDoPkmn8 ай бұрын
aaaaaAaAaa@@souvikchakraborty9900
@codinginflow2 жыл бұрын
now I'm happy that I started learning React in 2022 too lol. I just skipped this whole class thing.
@thelonercoder58162 жыл бұрын
same lol. Class components are so confusing to me but hooks makes it sooo much easier to understand lol.
@cycla2 жыл бұрын
@@thelonercoder5816 haha yeah! felt good we can just skip what was a major pain in the butt for a lot of devs in the past
@CST19925 ай бұрын
You want to know them, just in case you need them. I've been using React since 2019 and I have started with class components. They are, you can say, just a more explicit way of doing the same thing you are doing with hooks. For me it's backwards: instead of getting to use a separate function componentWillUnmount(), I have to remember that the function returned from useEffect() does the same thing.
@sathkur93 жыл бұрын
This video is must of every react developer. He made everything so simple and easy to understand and that to about so much of react features in just 13 minutes.
@AjeyChandhan3 жыл бұрын
You explained the whole feature set of the major change React has had in years in 13 minutes! That's just unbelievably awesome! ❤️
@mokroargra72773 жыл бұрын
Been working with react over 9 months now, learn something new everytime I watch one of your react videos. 🤯
@vikas77693 жыл бұрын
Bro I need some help
@Technoholicplus3 жыл бұрын
This is is the only video that not only cleared my hooks concept, but also shows the shortcut method to write eventhandling and state change in one line i.e. ( setNum(num+1)}>plus ) Thank you so much.
@Jorschm Жыл бұрын
Wow, It was actually easy to understand the core concept of the hooks in just 10min, I have seen 40min that could not explain a hook as good as this video. Great work.
@djvanschaik2 жыл бұрын
It is insane how well you explained all these hooks in not a lot of time without it seeming rushed/barely brushed over. Thank you!
@n0ame1u12 жыл бұрын
I just took an entire college course focused on React, and I learned way more from this video
@zackyang1233 жыл бұрын
This is flawless, clear, concise, and thorough. You are an exceptional natural teacher.
@zarghamaijaz59333 жыл бұрын
This is the only video i have found helpful. it's been a week and i have been struggling with react hooks. I am used to writing classes. Hooks feel very intimidating to me but after watching this video, i feel confident in using hooks instead of writing classes. Thank you for such an easy explanation
@Fireship3 жыл бұрын
Glad it helped!
@snansahmarov15243 жыл бұрын
I watched hours video for understanding React Hooks. This video did unbelievable, so easy, just 13 minutes. Thank you from Azerbaijan.
@dyinginmyroom-gs2gc2 ай бұрын
🇦🇲🇦🇲🇦🇲
@AryanLokar3 жыл бұрын
The amount of information your videos consist is unbelievable, really appreciate your efforts
@programmingpython5842 жыл бұрын
You youtube channel is simply dream come true for a developer. Short videos, great explanations, etc. It is just awesome
@usmanmir56633 жыл бұрын
You have me *”hook”* ed to this channel.
@Onserio.3 жыл бұрын
Boooooooooooo!
@everythingisfine99883 жыл бұрын
Yeeeessssssssss!
@jessejamison1283 жыл бұрын
go ahead and clock out for me
@natman8820013 жыл бұрын
now thats how you useContext()
@aw1lt3 жыл бұрын
HAHAHA bye.
@elhaambasheerch7058 Жыл бұрын
Easily the perfect mix of most informative and fun coding channel on the web.
@devmeta14783 жыл бұрын
Dude I'm in love with this channel, speed is perfect, finally someone who is not wasting 5 mins begging for subscribe, or speaking about his life or unrelated topics... And someone who is not writing code, testing and debugging in front of us... this is just perfect srsly... Keep up the perfect work!
@FaruhPaerhati3 жыл бұрын
My god, you explained the concepts and more in much better fashion than toiling over the docs for a week
@fithamlakfikrie4657 Жыл бұрын
The great ability of high-level explanations about general and wide concepts in only 13 minutes. thank you!
@MrRAHUL77777779 ай бұрын
You completed the 3 months topic in few minutes . Great work 👏
@akashthoriya3 жыл бұрын
Saved my hours to prepare for interview. Amazed by this video. Thanks a lot
@shivanigaddagimath61053 жыл бұрын
Hi Akash! Are you still looking for job opportunities currently ? Would you be interested in exploring a job opportunity in web development?
@kawsar.130 Жыл бұрын
One of the best explanations of React Hooks. Thank you for good stuffs 👌
@muhammadahmedjaved76913 жыл бұрын
never ever have I seen someone explaining complex things in simple and short words like you do you are a professional at explaining things
@tarunkr5352 Жыл бұрын
short and simple explaination that's what devs want. this is just that.
@nikosroom19132 жыл бұрын
This is literally the best youtube channel I have every found. THANK YOU!
@albertkim1809Ай бұрын
Thank you for this video - as a boomer coming from the old class-based ways, I wasn't up to speed on all of the built-in hooks.
@hobbiesandmore56332 жыл бұрын
I stumbled on this video but I’m glad I did! I was looking for ways to implement hooks in my program but had no idea what to do with them. When I watched this video I had a “Oh, THAT’S what it does” moment occur multiple times. Thanks for making this!
@foreverhumanpodcast2 жыл бұрын
I have watched this like 17 times and I’m learning each time again lol thank you
@aakashjadhav3272 жыл бұрын
I am watching this before my interview and it is helping me with my anxiety... I am feeling calm...
@HugoSanchez-kd7qz5 ай бұрын
Thank you for this! Used this a refresher and absolutely loved it. Wish we had a few more examples of each hook.
@s4lmon1343 жыл бұрын
this is the most amazing, concise, digestible video i've ever watch. Huge props!
@steelwolf1803 жыл бұрын
Really easy to understand and helps to point me in the right direction. For a problem, I was stuck on solving a UI component not updating by itself till I click on another component.
@ryanmamboudjemtchemeu42892 жыл бұрын
The best React Hooks video I've seen so far. Thank you for providing a such compelling video.
@wardenpataski28823 жыл бұрын
I kinda struggled to understand how to create a custom hooks before, but now I understand it after watching your explanation thank you :)
@snghnishant3 жыл бұрын
This is really helpful for me. I started learning React without understanding component life cycle completely and was struggling a bit. Now I can useRef() of this video. Thanks!
@saqlainalvi54852 жыл бұрын
I wish I had seen this video when I began learning hooks. Took me months of study and practice to understand them fully. This would have been a good entry point. Most tutorials fall short.
@Chrisknot943 жыл бұрын
Niiice another concise hook video in plain english. This is why this is my favourite dev channel 👍🏻👌🏻
@mattshnoop3 жыл бұрын
I have never used React before, and this video has made me that much more comfortable sticking with Vue 😅
@degitgitagitya94733 жыл бұрын
Hooks are beautiful. I have projects using both react and vue, both are awesome. I'm a react guy and i think it's easy to learn Vue if you already on intermediate level in React. But I don't know the learning curve if you learn Vue first.
@sebastiancordoba4373 жыл бұрын
Omg, today i was thinking of reviewing react hooks and this video show up, thanks!
@edwardarinin96783 жыл бұрын
same tho...
@irfanshaik13023 жыл бұрын
Lol.... same!!!
@GauravAgarwalR8 күн бұрын
After last working with React in 2016, coming back to it again is super confusing. But this video got me up to speed real quickly!
@ombhagwani7407 Жыл бұрын
i was here to revise my concepts and you got it all covered in 13mins , thanks a lot .!!
@williamboshi18553 жыл бұрын
It's definitely a tough chunk to digest but it's really interesting to have a peak at what react is since I always looked the other way toward angular and vue
@EduardKaresli3 жыл бұрын
For non-native English speakers, I'd recommend watching the video at 0.75 speed. Pretty dense (yet high quality) information.
@felipecabreira4321 Жыл бұрын
I always come back to this video to a fast/clean explanation of react hooks ! Thanks for the content my man ! Amazing :)
@nukemonk3 жыл бұрын
In addition to the *useImperativeHandle* hook: you can use this if you have both a *forwardRef* and a *useRef* in your component that you want both to be assign to the same element. You can use the *useImperativeHandle* hook to assign the regular *useRef* ref to the *forwardRef* ref. This is because you can't assign two refs to the same element.
@Lifeincuts9 ай бұрын
This video really helped me a lot, Im doing the Meta certification but they guy explaining this on the course sounds like an NPC. Thank you Jeff!
@himalayagupta77443 жыл бұрын
Well done man , I didn't expect this much clarity in just 13 minutes, but you explained everything perfectly. Thanks
@gautampatadiya60962 жыл бұрын
Many videos I saw but this one is simple specific and easy to understand… thanks
@CodingAfterThirty3 жыл бұрын
Another awesome video. I love React hooks. I just recently started diving into writing custom hooks. It has been an excellent way to create reusable functionality as well as not stuffing all the logic in one file. Thanks for this video.
@nomtijorti3 жыл бұрын
Saw Angular Logo with caption (best framework ever).. that's why I'm subscribed. lol
@anth0ni333 жыл бұрын
Wonderful information in just 10mins. You're a national treasure!!!
@devsauce3 жыл бұрын
- 1:34 - Ben Awad has entered the chat
@kamaleshpramanik76456 күн бұрын
Thank you very much Fireship.. So much to learn from single video.
@zacktaylor11432 жыл бұрын
Your UseEffect explanation was brilliant.
@3mro_coding3 жыл бұрын
Maan! I love taking tour in your channel you deliver clean and conscious contents.
@imchiennb3 жыл бұрын
I don't need to spend more time to get understand hook concept in react. Many thanks for awesome video.
@denistomasovic95063 жыл бұрын
I'm not a native speaker, so it's sometimes hard to understand for me. But I'm surprised how clearly you explained hooks. It was realy useful. Thank you..
@kristineximeno67392 жыл бұрын
1. useState 2. useEffect 3. useContext 4. useMemo 5. useCallback 6. useRef 7. useReducer 8. useImperativeHandler 9. useLayout 10. useDebugValue not in order of the video.. tho. lol Very informative video. Thanks!!! Even 8 and 9 is described as rare, I actually use these very often when building more complicated UI/UX.
@Lyftic3 жыл бұрын
I learned that "if/else if" computes 3 times faster if you use the "===". So I make use of that instead of the switch inside a reducer function!
@corneasp94182 жыл бұрын
By experience or do you have a link to an official resource?
@pjalex983 жыл бұрын
I have survived just with useState, useEffect and useReduce hooks, and now I can try to understand the others to implement in my projects by watched this video.
@christoferberruzchungata27223 жыл бұрын
This video was exactly what I was looking for. I have been struggling two days to implement a feature and all I needed was the useLayoutEffect() and I didn’t know it existed.
@yuliavasylenko86032 жыл бұрын
So simple and useful! Thanks a lot for explaining these things in the most understandable manner.
@ali-celebi3 жыл бұрын
1:34 (best framework ever) - I just can't agree more :)
@pradeepsaravanan43483 жыл бұрын
LOL
@Euquila3 жыл бұрын
One thing to note about `useCallback` is that it isn't _just_ needed to improve performance. Sometimes, we need it because a useEffect depends on the function which can cause infinite loop scenarios. So basically, useCallback can save us from these infinite-loops!
@michaelraring9473 Жыл бұрын
Yeah, but only if you include all functions/variables in your dependency array, like EsLint/TS wants you to do..
@ffelaar2 жыл бұрын
you are ridiculously good at explaining things succinctly in a short amount of time - thank you for this great content.
@kocraft1373 жыл бұрын
Love the pace you have in your videos. And the visuals is just stunnig
@day2dayja1103 жыл бұрын
Where was this video a year ago!!!!!! EXCELLENT!!!!!! 10000/10
@reda_el3 жыл бұрын
Wow, I had a really hard time figuring out precisely how hooks were working until I found this video. It's so clear and explaining the fundamentals (the key). I'm literally looking for a way to join any newsletter you have because I love the way you communicate complex principles.
@crimsoncad32303 жыл бұрын
Angular bois finally got some love.
@pharmokan3 жыл бұрын
Dozens of us are so happy. DOZENS!
@juniordev41903 жыл бұрын
@フルブライトケネス what r u talking about? V12 has just launched.
@McMurchie2 жыл бұрын
This was amazing, it took me over an hour to write down the notes so much knowledge
@johnnygotti15682 жыл бұрын
I never figured out useContext until now... thank you so much man
@punio43 жыл бұрын
A correction for the useEffect cleanup function: It won't only run when the component is unmounted, but every time before the useEffect hook is called. In that way, it's not the same as componentDidUnmount, but more of a way to prevent stale data bugs to give the useEffect a blank slate on every run.
@glowiever3 жыл бұрын
really? wouldn't that be non performant
@pathumjayasuriya59023 жыл бұрын
Thanks for quick but clear intro on react hooks.
@AbhigyanGautam3 жыл бұрын
I am learning React and this is the video I needed
@waseemtahir67403 жыл бұрын
Man! That "Angular best framework ever" was the only thing I needed after watching few Ben Awad videos.
@yashsolanki0692 жыл бұрын
This channel is the fresh breath of air for devs♥️
@nbs00783 жыл бұрын
Even if these videos don't explain stuff in detail, they sure give an overview of the topics......which is a huge deal to IT students like me whose textbooks don't even cover Git or ES6!!!!
@gracewood67683 жыл бұрын
best of the best. I never understood each of them but now I got a grasp about it.!
@amarmohammed56442 жыл бұрын
brilliant to watch just before a interview :)
@wiz79033 жыл бұрын
You always manage to put out a video that i just need in that exact moment. Simply amazing. Keep up the good work
@riddixdan55723 жыл бұрын
would really want to see a video that would compare react and angular. so far, react with functional components seems so easy and straightforward while angular confuses the hell out of me. Edit: Now that I have watched some beginner videos about angular, I have reached a conclusion that angular is nice and comfortable, but the only thing that annoys me is the template-based html.
@213_sayonsom52 жыл бұрын
Great explanation !
@Tomas-ps2zf3 жыл бұрын
Hi! Great video as always. I'd like to add though, that useEffect clean up function (the return of the first parameter) is not only called when the component is destroyed or unmounted (as you stated here kzbin.info/www/bejne/in_LknyJhLqsbLM ), but also before the next call to it when a dependency changes. To put it more clearly in an example: const [counter, setCounter] = useState(0); useEffect(() => { alert(counter); return () => alert('goodbye') }, [counter]); When the component is first called, it will alert 0, then, when we set counter to 1, it will alert 'goodbye' and then 1, same as with 2 and so on.
@danielzaiser3 жыл бұрын
I have never returned a function like that, remind me to try it out tomorrow
@gerritweiermann793 жыл бұрын
@@danielzaiser reminder :)
@nope-zdvcz992 жыл бұрын
@@gerritweiermann79 what, reminder is noun, not verb :v
@yosuanicolaus2 жыл бұрын
@@danielzaiser it's been one year, have you returned a function like that?
This is awesome 🔥 I've been preparing myself for upcoming interviews I'm going to have and this has explained reacts hooks quite for me, it'll come in handy when asked.
@vikram87in2 жыл бұрын
It's so amazing how this guy can pack so much data into such a small video.. respect. Great video 😍😍
@vishmapdas78983 жыл бұрын
I have a feeling that you will add much value to my life. Liked and Subbed.
@shaheenumar49263 жыл бұрын
Every second is worth watching this channel.❤️
@mostinho7 Жыл бұрын
Done thanks React hooks can be used only at the top level inside the functional component function definition. Hooks: useState useEffect make sure to provide dependencies array, if no dependencies then pass empty array useEffect can have a cleanup function by returning a function from the useEffect callback, will be called when component un mounts useContext lets you share state from a parent component to child components without having to pass props down useRef use when you want to grab a reference to an html elements and programmatically. useContext lets I access the context from the context provider up the tree useReducer is a better alternative to useState as it allows you to dispatch events or actions from ui elements then handle these events in the reducer function. useReducer takes the reducer function which takes the state and the dispatched action so you can do a switch case in the reducer and handle them useMemo to cache computationally expensive values so that they aren’t recalculated on every render. Takes a dependency array like useEffect to decide when to recalculate the value useCallback is like useMemo but it caches an entire function definition. When you define a function in your component, that function gets redefined after every render. useMemo causes the return value to be cached, so the function isn’t run on every rerender but with useCallback the function isn’t redefined on every render. This is useful when ui elements have a reference to that function like if it’s an onclick handler. When that function is redefined the component that has reference to it will get rerendered and useCallback prevents this, it is useful when many ui elements have reference to that function useImperativeHandle
@filipjnc3 жыл бұрын
To avoid bugs in your case you should rather use setCount(prev => prev + 1) instead of setCount(count + 1).
@codeaperture3 жыл бұрын
True👍
@arpansaha5638 Жыл бұрын
Can you elaborate on how this method results helps avoid bugs compared to the other method?
@EpicKeyz Жыл бұрын
@@arpansaha5638if you need to set state based on previous state, you should use a callback function that receives a previous state as the first argument
@gerhard_adler Жыл бұрын
@@arpansaha5638 Beacause if you run setCount(count + 1) twice very close to each other, count won't be updated for the second call. Meaning count will be added 1, instead of the expected 2. Meanwhile, if you use prev, React ensures the count is updated before the next call.
@shineLouisShine Жыл бұрын
Really good and informative video which probably should get updated once in a while. One note: 10:39 -- unfortunately this video didn't manage to make it less confusing.
@msjahun2 жыл бұрын
Most useful video I’ve watched on hooks
@lukas.webdev Жыл бұрын
I just posted a video on a similar topic (in 2023) - maybe this could be interesting for you as well. 😉
@Aba98463 жыл бұрын
Thanks for showing the differences between functional components and class-based components
@101kawsar2 жыл бұрын
I don’t really understand why people find useEffect hook confusing. It’s the most straightforward thing I have ever seen and I learned this thing before componentDidSh!t thing.
@rain-techstudio25672 жыл бұрын
This is amazingly easy to understand with just 10 minutes!! Thanks a lot great man!
@usmanmir56633 жыл бұрын
A video about React Native! And Compare it with Flutter.
@monfernape3 жыл бұрын
He actually has one created.
@MathaGaram2 жыл бұрын
It is just great if u have interview next day and u may get asked to explain these hooks with some quick examples. Specially useMemo, useCallback, useReducer, custom hooks.