Learn React Higher Order Component (HOC) in 10 Minutes

preview_player
Показать описание
"Copyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use."

INSTAGRAM : @talhankofficial
TWITTER : @TalhaNk2
Рекомендации по теме
Комментарии
Автор

I literally wasted few hours to learn HOC. But This video make me undestand In just 10 minutes. Simple and concise 👏👏

shilpachauhan
Автор

Yo! I've been spending the whole morning trying to understand what HOC was about and you make it clear for me in less than 10 minutes. Thank you bro.

alcidesign
Автор

You explained so much in just 10 mins. I really learnt a lot from this tutorial.

paschalynukwuani
Автор

This was extremely clear and very good. I appreciate the simple and concise explanations / demonstrations you gave

yazeezy
Автор

Greatest video on YouTube for Higher Order Components. Kudos to you bro.

thefreemonk
Автор

What if we create a single Component with state value as money and an option to increase money.

<Person name="Jimmy" initialBid="10" />
<Person name="John" initialBid="20" />

they will have a button to increase the bid in component Person. Can you please explain why do we need to add this inside HOC here if the component can manage this using props?

abhirocks
Автор

Thank you! This video gives us a clear understanding of HOCs. 🙏

nalindu
Автор

This is by far simplest explanation using functional components on whole utube!!

altamashaseer
Автор

Sir... When I am telling you ke you are the best I MEAN IT. I have been trying to understand HOC for 2 hours now but not a single video is with small but good example... Your video saved my life 😭.... Thank you so much for this code example I will never forget this. ♥️

akashsinha
Автор

This explanation deserves a standing ovation!

andrewaghoghovwia
Автор

Such a simple explanation. Thank you so much

balajiganesh
Автор

That is actually a very good explanation! Thanks!

MoritzWright
Автор

Thank you so much for this! Really helped me understand the basics of HOC.
What if for Jimmy we multiply by 2 and for John we add 10, is that possible in HOC as well? how will it be written?
If you could make a video of more complex logic of HOC that would really be amazing!
Thank you!

JakeOfIL
Автор

you explained it very nicely brother. Keep going....
😊 thanks!!!

CreativeNerdVentures
Автор

great thanks, you're explanation is so much clear and on point

katynguyen
Автор

Best example and very clear exaplanation, If we have this kind of trainer everyone will get job and become good developer. Thank you so mutch.

revanthkumarsake
Автор

Great video, What are the other situations to use HOC ?

Cosmos_the_stardust
Автор

Good explanation, thank you!
I have a doubt about the "NewComponent", why is it not receiving any prop?
And why are you returning "OriginalComponent" and "NewComponent"?

danielmorales
Автор

very well made, my thanks for who made this video, it's content is concise and simple, perfect for begginers!

It_guy
Автор

Very beautiful. I am a JS dev for a long but new to React and HOC was one of the concepts I was confused about. You explained it well. I can relate tp a few points explained below.

I would add some points about the use case for the other viewers:

1. It makes your code follow DRY( Don't Repeat Yourself) principle. ➿
2. In React it's always better to avoid as less stateful components as possible. Putting the state in the HOC and making the useable components stateless, made us follow the principle, and made the state centralized for similar code bases. ✅
3. It's a very much asked question in the interview, not a use case though. 🤣🤣🤣🤣

ritomukherjee