React tutorial in Hindi #40 useMemo Hook
HTML-код
- Опубликовано: 28 ноя 2020
- In this react js tutorial for beginners series we learn what is useMemo Hook in react js and how to learn it with interview questions in react js. This video is made by anil Sidhu in the Hindi Language.
git link for this video
github.com/ani...
Playlist for complete React series in Hindi
link • React tutorial for beg...
useMemo Hook in React js
Why use useMemo Hook?
Understand Problem
Apply useMemo?
Interview Question.
Join on Insta @php.step.by.step
bhai ko 21 thopo ki salami ...... great explaination...🥰
Sir this course is way underrated 😭
This course deserves so much more views
You structured this course very well
I saying this because I watched some other creators courses and i found this course is way better
Thanks alot sir for uploading this course❤️✨
Don't cry bro I am with you
No, you cannot use useMemo directly in class components because useMemo is a React hook, and hooks are designed to be used only in functional components.
i used to be so scared of learning React thinking it must be hard for me use ..now i feel pretty confident..thanks to YOU!
## difference between useEffect and useMemo
useEffect is a hook used in React for handling side effects, such as data fetching, subscribing to events, or manually manipulating the DOM. AND
useMemo is used for memoizing the result of a computation. It takes a function and a dependency list, and it returns the memoized value of that function.
chat gpt se niakla h kya ye
I think usecallback and usememo is kind of similar but useEffect is different clearly
@@rehanmultani1110 I don't remember what I did at that time, but I know difference between them and use them
best video i have ever seen on youtube for useMemo❤🔥❤🔥❤🔥❤🔥❤🔥❤🔥❤🔥
What a great explanation. you cleared my concepts. Thank you very much ❤️
useEffect hook wali video m bhe yahi btya tha wo componentDidMount wala kam kerta ha to kam to useMemo ka bhe yhi ha to phr in m difference kaya ha
kindly response kijiay ga
@@PMARQS useEffect tab use hota ha jab screen relod hoti ha jabkay usememo tab use hota ha jab funtion call hota ha
yar 3 to 4 time deka ta but concept clear nai horaha ta iss vedio may clear thank you very muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhjhjhhhhhhhhhhhhhhh
nice and best video
ans => useMemo nhi use kar saktay class ma os ma PureComponent use karray ga
Osm course.This type of course is required .
so beautiful, so elegent, just looking like wow...
shouldComponentUpdate() use karne hoga class component me useMemo functionaly achieve karne kliye..
thank you for a simple explanation
No, because hooks are not implement in class component, please correct me if I'm wrong.
can we do the same using useEffect instead of useMemo?kind of confused between the two.!!....nice series bro ....please keep uplaoding
Same question from my side also.
useeffect cause rerender while usememo runs always on render not before nor after, plus useeffect has unmount event, i think this is the difference, might be I am wrong
Key Difference is below:-
useMemo hook => If you use the use memo hook on top of your component it’s triggered before the updated render has it dependent on all your props, it runs before everything every time props change.
useEffect hook => if you use the use effect hook on top of your component it’s triggered after the updated render and since dependent on all props it triggers after a rerender depending on all props.
If you see, we are calling a function here. If we put a function to return inside useEffect Hook and try to use it outside then it will give an error because the function will only have its scope inside the useEffect hook itself.
Sir ,Can we say without using usememo all functional component are not pure component? After using usememo hook it will become pure component?
We can't use hooks in class components. And useMemo is a hooks.
Right
ek number explanation boss
When i use any hooks like useState or useEffect. I got an error that says write "use client" at the top of the code in the parent or child component. But in videos i am not seeing anything like this error. Can anyone explain to me??
sir usememo ke jagah to useeffect bhi to use kar sakte hai na......? , phir dono me kya difference hai...?'
useMemo class componet me use nhi kar sakte hai. or aap ki "pureComponet in class" wali video me bhi bataya hai.
If observe in your past video about useEffect there also we can avoide to unwanted rerender by passing the state & props then why we need this. Or what is difference between useMemo() & useEffect(). as per example same I can achive with the useEffect() as well right ?
Sir, but why the function actually runs without we calling to that function🤔🤔
great explaination keep the good wrok
sir apne starting main bola tha ki hum function component main hook use karte hai useMemo hook hai. and class component main pure component use karte hai.
hum class component may use memo nhi use kr skaty ku ky use memo 1 hook hai or hooks ko create he function component ky liyay kiya gya tha
I guess useMemo like componentDidUpdate( useEffect ) because in componentDidUpdate we do same thing if we don't want to re-rendring the data again so we pass secoond param just like array and pass them .
useEffect(()=>console.log('do something'),[variable]);
nope , useeffect always runs when the component renders and then it will run when the value of the dependency changes .
whereas in useMemo it will only run when the value of the dependency changes
no we cant use usememo in class component because hooks are functional component
Why multuCount() is calling ? onclick we are just updating count and item value only?
Same Question
multicount function call kaise ho raha hai update count karne ye nahi bataya sir aapane
sir usemeo ke jgh use effect ka use kr sakte hai fir last [count] de rhe hai
sir use memo hook ka use time optimization ki wja se nh kia jata kiya apne tu concept hi almost change krdia just apne unwanted update pr explain krdia ??hm log cashe se laakr program kw duabara run hune se kese ruken yeh sb apne explain hi nh kra?
Awesm
I don't understand why the items auto run. We only click the count button then why item run?
Best explanation
Thanks for liking
No we can't use useMemo in class component coz useMemo is feature of functional based component do we can't use. isn't it ?
Very helpful
Sir is tarah ke prevention ke liye kya hm useEffect use kar skte hai
Sir, React and Angular me better kaun hoga? job oriented or future carrier ke liye???
React
@@codestepbystep Why you are not choose Angular even you have already uploaded video on Angular Platform
@@oss7281 Angular is too time takingt to learn
superb
How to render dom using usememo hook in react js ? can you explain how .
a question if useMamo hook is used to stop the unwanted function to run when we update things then what is compShouldUpdate used for ?
ComponentShouldUpdate is a class component feature
Nice
Why Multicount() auto call as we only click on setCOunt
nice 1 aapne new play list main add q nahi kiya ?
Yes we can use memo in class component but in class component write memo
Anil bhai ap nay useEffect hook wali video m bhe yahi btya tha wo componentDidMount wala kam kerta ha to kam to useMemo ka bhe yhi ha to phr in m difference kaya ha
kindly response kijiay ga
Dono ke difference pr video bni hui h bro. Aap do dekho 🤗
@@codestepbystep ok thanks for your quick response...Your way of delivering knowledge is really appreciated...God bless You😍
we can not useMemo in class Component in react js or react native useMemo like a hook
but why this unwanted call happen ?
sir table wala video, row data, column data selection, cell selection , wala video kab banaoge??
UseMemo class components main use nh krskty Apne is video KY start main ho bola Hai
Class component main hum srf pure component use krty h
we can't use uesMemo hook in class component,
Plz make video usememo and usecallback difference.
Hi can we use this hook to memoize a sub component which is being used in the current component
by using dependency [count] whenever count will be there it will only update the count part.
No, cannot use useMemo in class components, hooks only works with functional components.
How to memoize whole functional component
what is diffrennce between usememo and useeffect its ook like same
UseEffect work same as componentDidMount and useMemo work like shouldcomponentUpdate
sir Callback hook ka bhi video banea sir.
No sir hook class component me use nahi hote
useMemo() ko calss component k ander use nahi kar sakte
yes because useMemo is a hook and we cant implemented hook in class component
No we cant use Any Hooks in Class component
👍👍
Thanks you sir
bhai iske liye ham useeffect b use kr skte h same kam h bhai.. fir yhi kyu
bhai useeffect ka kaam hota h ki wo kuch kaam kare complete component render hone k baad, but ye useMemo hota h ki unwanted render se bachane k liye hota h iska use hm component render ho jaane k baad nahi kar sakte, hope you got clarity now? hit like i'll understand that you got clarity.. thanks
We can also use the useEffect hooks Solved in this type of problems.
How?
By passing dependency array ?
2023 ❤
No we can't use useMemo in class components.
I am facing a issue after using useMemo. when I console anything from memo it logs it twice in the console. I made a function which stores currentTime and in console it shows like if its 10 am then 10 10.
try with useCallback
no we cant use use memo
Hello sir waiting for PHP tutorial first video
Are you doing job or business
both
@@codestepbystep in class based component if we state does not change does it rerender? and in functional based it does not re-render if state does not change?
no we can't use useMemo() in class component because useMemo is a hook and hooks can be used in functional component only.
nhi hoga use class me ye
No
we cannot use any hooks function in class component
watch useCallback Hook in Hindi in easy way explained
ruclips.net/video/Gj68rN0vLSc/видео.html&ab_channel=Front-EndHacks