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

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

  • @deepakgauttam29
    @deepakgauttam29 Год назад +10

    bhai ko 21 thopo ki salami ...... great explaination...🥰

  • @harshsajla7216
    @harshsajla7216 2 года назад +25

    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❤️✨

  • @laraibmukhtar8959
    @laraibmukhtar8959 Месяц назад +5

    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.

  • @imasunflowerlilfunny3353
    @imasunflowerlilfunny3353 Год назад +2

    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!

  • @ShivShankar000
    @ShivShankar000 Год назад +11

    ## 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.

    • @rehanmultani1110
      @rehanmultani1110 10 месяцев назад

      chat gpt se niakla h kya ye

    • @talhaanwar1005
      @talhaanwar1005 4 месяца назад

      I think usecallback and usememo is kind of similar but useEffect is different clearly

    • @ShivShankar000
      @ShivShankar000 3 месяца назад

      @@rehanmultani1110 I don't remember what I did at that time, but I know difference between them and use them

  • @yagneshacharya2461
    @yagneshacharya2461 7 месяцев назад +1

    best video i have ever seen on youtube for useMemo❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥

  • @uzairahmad7442
    @uzairahmad7442 2 года назад +11

    What a great explanation. you cleared my concepts. Thank you very much ❤️

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

      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

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

      ​@@PMARQS useEffect tab use hota ha jab screen relod hoti ha jabkay usememo tab use hota ha jab funtion call hota ha

  • @mustafajamal8706
    @mustafajamal8706 7 дней назад

    yar 3 to 4 time deka ta but concept clear nai horaha ta iss vedio may clear thank you very muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhjhjhhhhhhhhhhhhhhh

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

    nice and best video
    ans => useMemo nhi use kar saktay class ma os ma PureComponent use karray ga

  • @tridevthakur7711
    @tridevthakur7711 2 года назад +1

    Osm course.This type of course is required .

  • @mayappapujari9259
    @mayappapujari9259 5 месяцев назад +1

    so beautiful, so elegent, just looking like wow...

  • @Travelmoments
    @Travelmoments 2 года назад +2

    shouldComponentUpdate() use karne hoga class component me useMemo functionaly achieve karne kliye..

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

    thank you for a simple explanation

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

    No, because hooks are not implement in class component, please correct me if I'm wrong.

  • @manishshaw2393
    @manishshaw2393 3 года назад +9

    can we do the same using useEffect instead of useMemo?kind of confused between the two.!!....nice series bro ....please keep uplaoding

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

      Same question from my side also.

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

      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

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

      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.

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

      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.

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

    Sir ,Can we say without using usememo all functional component are not pure component? After using usememo hook it will become pure component?

  • @subhashkesarwani2452
    @subhashkesarwani2452 3 года назад +11

    We can't use hooks in class components. And useMemo is a hooks.

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

    ek number explanation boss

  • @user-ww9nw9fg3z
    @user-ww9nw9fg3z 3 месяца назад

    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??

  • @coderdhruv
    @coderdhruv 2 месяца назад

    sir usememo ke jagah to useeffect bhi to use kar sakte hai na......? , phir dono me kya difference hai...?'

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

    useMemo class componet me use nhi kar sakte hai. or aap ki "pureComponet in class" wali video me bhi bataya hai.

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

    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 ?

  • @parmeshwarkotnur
    @parmeshwarkotnur 2 года назад +1

    Sir, but why the function actually runs without we calling to that function🤔🤔

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

    great explaination keep the good wrok

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

    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.

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

    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

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

    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]);

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

      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

  • @kanishkasaraf1646
    @kanishkasaraf1646 7 месяцев назад +1

    no we cant use usememo in class component because hooks are functional component

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

    Why multuCount() is calling ? onclick we are just updating count and item value only?

  • @techdigvijay
    @techdigvijay 17 дней назад

    multicount function call kaise ho raha hai update count karne ye nahi bataya sir aapane

  • @rohitkumar-ce7pj
    @rohitkumar-ce7pj Год назад

    sir usemeo ke jgh use effect ka use kr sakte hai fir last [count] de rhe hai

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

    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?

  • @Marshal-786
    @Marshal-786 7 месяцев назад

    Awesm

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

    I don't understand why the items auto run. We only click the count button then why item run?

  • @ChandanKumar-ix3io
    @ChandanKumar-ix3io Год назад

    Best explanation

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

    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 ?

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

    Very helpful

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

    Sir is tarah ke prevention ke liye kya hm useEffect use kar skte hai

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

    Sir, React and Angular me better kaun hoga? job oriented or future carrier ke liye???

    • @codestepbystep
      @codestepbystep  3 года назад +4

      React

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

      @@codestepbystep Why you are not choose Angular even you have already uploaded video on Angular Platform

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

      @@oss7281 Angular is too time takingt to learn

  • @user-hs2tb8lq2t
    @user-hs2tb8lq2t 9 месяцев назад

    superb

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

    How to render dom using usememo hook in react js ? can you explain how .

  • @UmairAli
    @UmairAli 8 месяцев назад

    a question if useMamo hook is used to stop the unwanted function to run when we update things then what is compShouldUpdate used for ?

    • @bilaljaved1900
      @bilaljaved1900 4 месяца назад

      ComponentShouldUpdate is a class component feature

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

    Nice

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

    Why Multicount() auto call as we only click on setCOunt

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

    nice 1 aapne new play list main add q nahi kiya ?

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

    Yes we can use memo in class component but in class component write memo

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

    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

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

      Dono ke difference pr video bni hui h bro. Aap do dekho 🤗

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

      @@codestepbystep ok thanks for your quick response...Your way of delivering knowledge is really appreciated...God bless You😍

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

    we can not useMemo in class Component in react js or react native useMemo like a hook

  • @hk-nu2zt
    @hk-nu2zt Год назад

    but why this unwanted call happen ?

  • @Armankhan-jy4eb
    @Armankhan-jy4eb 3 года назад

    sir table wala video, row data, column data selection, cell selection , wala video kab banaoge??

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

    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

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

    we can't use uesMemo hook in class component,

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

    Plz make video usememo and usecallback difference.

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

    Hi can we use this hook to memoize a sub component which is being used in the current component

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

      by using dependency [count] whenever count will be there it will only update the count part.

  • @HanumanX-le2jt
    @HanumanX-le2jt Год назад

    No, cannot use useMemo in class components, hooks only works with functional components.

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

    How to memoize whole functional component

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

    what is diffrennce between usememo and useeffect its ook like same

    • @professionalfunny
      @professionalfunny 7 месяцев назад

      UseEffect work same as componentDidMount and useMemo work like shouldcomponentUpdate

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

    sir Callback hook ka bhi video banea sir.

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

    No sir hook class component me use nahi hote

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

    useMemo() ko calss component k ander use nahi kar sakte

    • @professionalfunny
      @professionalfunny 7 месяцев назад

      yes because useMemo is a hook and we cant implemented hook in class component

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

    No we cant use Any Hooks in Class component

  • @Armankhan-jy4eb
    @Armankhan-jy4eb 3 года назад

    👍👍

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

    Thanks you sir

  • @AasifKhan-xt6os
    @AasifKhan-xt6os 3 года назад

    bhai iske liye ham useeffect b use kr skte h same kam h bhai.. fir yhi kyu

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

      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

  • @SanjuKumar-ye8xz
    @SanjuKumar-ye8xz 2 года назад +2

    We can also use the useEffect hooks Solved in this type of problems.

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

    2023 ❤

  • @ArvindSingh-fe5tf
    @ArvindSingh-fe5tf Год назад

    No we can't use useMemo in class components.

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

    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.

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

    no we cant use use memo

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

    Hello sir waiting for PHP tutorial first video

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

    Are you doing job or business

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

      both

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

      @@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?

  • @namanmamodia5731
    @namanmamodia5731 5 месяцев назад

    no we can't use useMemo() in class component because useMemo is a hook and hooks can be used in functional component only.

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

    nhi hoga use class me ye

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

    No

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

    we cannot use any hooks function in class component

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

      watch useCallback Hook in Hindi in easy way explained
      ruclips.net/video/Gj68rN0vLSc/видео.html&ab_channel=Front-EndHacks