useReducer React Hook - When to use useReducer - useReducer vs useState - React Hooks Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024

ความคิดเห็น • 25

  • @tapasadhikary
    @tapasadhikary  ปีที่แล้ว

    Topics Covered:
    0:00 - What will we cover?
    01:20 - The app: My Bucket List
    03:14 - useState to implement bucket list
    10:55 - The problem with useState hook
    14:42 - The anatomy of useReducer hook
    17:48 - Conceptualize useReducer(with diagram)
    23:39 - useReducer to implement the bucket list
    36:33 - Summary and Wrap Up

  • @bishwajeetpandey1570
    @bishwajeetpandey1570 ปีที่แล้ว +2

    Sir please continue the series and also make videos on React-router-dom v6

  • @prashlovessamosa
    @prashlovessamosa ปีที่แล้ว +1

    Sir I have completed your videos in 2 days kindly complete this series you don't know great your videos are you are such a brilliant teacher kindly complete this series please 🙏

  • @WildForce-Zoo
    @WildForce-Zoo 6 หลายเดือนก่อน +1

    Very clear explanation. could you please post unit testing video as well?

    • @tapasadhikary
      @tapasadhikary  6 หลายเดือนก่อน

      Thank you! Yes, someday I want to. Also on TDD.

  • @helenrijo884
    @helenrijo884 ปีที่แล้ว +1

    Thank you so much for your clear explanation. I am kind of confused with the meaning of state which is very often mentioned here. Does state imply to use state or state of an html Element? Could you please clarify it.

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว

      Thanks Helen, glad you liked it. The state of a component means the private data that a component needs to get fully functional as it is expected. For example, if you have counter component, it must have a private data(variable) called counter to track the count.. so that's its state.
      I have covered it in one of the initial videos of the same series.

  • @RajaduraiKalyanasundaram
    @RajaduraiKalyanasundaram ปีที่แล้ว

    Hello Tapas, Thank you so much for your viedos, somehow landed to this channel and continued to play rest. Your teaching skills are really nice. If possible, please post viedoes on advanced javascript and weird part of javascript. Have one question.. In RTK, We have an option to write async actions using createAsync api and the subsequenct actions(pending, fulfilled, rejected) managed in extra reducers. But how can we write async actions and dispatch in useReducer?

  • @user-zu1lh4uc4o
    @user-zu1lh4uc4o ปีที่แล้ว +1

    Hello Tapas Da, thanks a lot for your detailed explanation. It was indeed helpful to learn React. Can you explain one thing; when shall we use .js or .jsx file? I'm not too clear on this point.

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว +1

      Thank you!
      Use jsx extension for the files where you write components. As components have JSX in it, better to use the jsx extension for them. Rest use the .is where JavaScript code exists. Hope it's clear?

    • @user-zu1lh4uc4o
      @user-zu1lh4uc4o ปีที่แล้ว +1

      Yes, very much! I saw in your previous videos that components were written in a .js file. I understand that both works but .jsx is better when components are written.

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว +1

      Yes that the standard practice to use jsx for components.

    • @user-zu1lh4uc4o
      @user-zu1lh4uc4o ปีที่แล้ว +1

      Thank you so much!

  • @shreyashbijlwan2264
    @shreyashbijlwan2264 ปีที่แล้ว +2

    i was early waiting for this thank you

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว +2

      Awee, thanks a lot. I hope you find it helpful.

  • @abdushakoor0099
    @abdushakoor0099 ปีที่แล้ว +1

    which font are you using in vscode?

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว +1

      I use the GitHub theme(dark default) without any customizations. Here is the link to add it:
      marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme

    • @abdushakoor0099
      @abdushakoor0099 ปีที่แล้ว +1

      @@tapasadhikary thanks

    • @abdushakoor0099
      @abdushakoor0099 ปีที่แล้ว +1

      @@tapasadhikary and nice video BTW. my components files are gettings cluttered especially in data table screens. This should help

  • @ITisEasyProgrammingChannel
    @ITisEasyProgrammingChannel ปีที่แล้ว +2

    Hello Tapas I'm curious what you say about the eventrix library. Please try it and let me know what do you think :)