Props vs Context vs Redux vs Recoil | React State Management

Поділитися
Вставка
  • Опубліковано 25 сер 2024

КОМЕНТАРІ • 21

  • @clublati
    @clublati 4 роки тому +2

    Thanks for making this comparison. I've used Redux in most of my projects and wanted to quickly check the state of things. This helped a lot!

    • @RedhwanNacef
      @RedhwanNacef  4 роки тому

      You’re welcome. Glad it helped!

    • @tareeko
      @tareeko 2 роки тому +1

      Pun intended?

  • @SergioArroyoSailing
    @SergioArroyoSailing 4 роки тому +2

    Thanks so much! this is the exact video I was looking for! now only if I could understand it ;)

    • @RedhwanNacef
      @RedhwanNacef  4 роки тому

      You're welcome. Let me know if anything is still unclear, happy to try help.

  • @user-oy4kf5wr8l
    @user-oy4kf5wr8l 2 роки тому +1

    Thanks buddy! great tuto!

    • @RedhwanNacef
      @RedhwanNacef  2 роки тому

      No problem! Glad you enjoyed it :)

  • @0xlkda
    @0xlkda 4 роки тому +1

    So good bro! thank you for the flow

  • @rammahhani7775
    @rammahhani7775 4 роки тому +1

    good .clean .. simple .. you are really good

  • @abhishekpratap05
    @abhishekpratap05 3 роки тому

    I was actually looking exactly as I have big project and was thinking of using context for creating small chunks for each module, as project need to have modules(widgets) which user choose to have on screen (1-6 widgets at a time on screen) and can close and open other widget any time, but re-rendering is going to be an issue as I am getting data via web socket. Will go back to the redux solution what I initially thought.
    If you have any other idea please do suggest.

    • @RedhwanNacef
      @RedhwanNacef  3 роки тому

      Hi, It's a bit difficult to suggest anything without better understanding, but generally I would advise that most scenarios can be handled with straight up react state and some prop drilling, if the components are structured well this may work fine. Personally I would struggle to find a good reason to use Redux (for projects that don't already).

    • @abhishekpratap05
      @abhishekpratap05 3 роки тому

      @@RedhwanNacef Thank you, thinking of keeping redux for something like global data, which is needed for making api call and showing details in each widgets, and use redux to store data which is going to be coming from web socket(data changes every second) and will be handled better as redux is good at it like batch update an all. Apart from that rest other to use state and drilling props down to 1-2 level.

    • @RedhwanNacef
      @RedhwanNacef  3 роки тому +1

      Cool stuff, hope it all goes well. I would recommend having a look at react-query (react-query.tanstack.com/) for api calls too if you haven't already.

    • @abhishekpratap05
      @abhishekpratap05 3 роки тому +1

      @@RedhwanNacef Thank you so much, I mean haven't heard about it before but looks promising.

  • @imaginary_pies
    @imaginary_pies 4 роки тому

    where those description labels come from ? (callback, predicate, dependants . . . )

    • @RedhwanNacef
      @RedhwanNacef  4 роки тому +1

      They are an IntelliJ feature called Inlay Hints: www.jetbrains.com/help/idea/inlay-hints.html.

  • @DanielNistrean
    @DanielNistrean 4 роки тому +1

    I'd suggest getting a better microphone :)

    • @RedhwanNacef
      @RedhwanNacef  4 роки тому +1

      I already have :) hopefully my latest videos are a bit better.

    • @dariusz4434
      @dariusz4434 Рік тому

      ​@@RedhwanNacef In my opinion the mic quality is fine :)