Slices | createSlice | Redux Toolkit Introduction | React

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

КОМЕНТАРІ • 22

  • @simeonieroteev4555
    @simeonieroteev4555 3 роки тому +3

    Amazing playlist, Raul Terhes! I'm highly recommending these videos to everyone who want to know how to use a redux-toolkit library! Very , very clear and simple explanation of the topic. Maybe the last thing for covering should be: How to make async actions using redux-thunk with toolkit?

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

      Hello. Thank you so much for the feedback. I still have planned to make two more videos about saga, on how you can handle actions defined in different slices and how to replace the redux-thunk middleware with redux saga middleware, but I will plan a video on how to also make async actions using redux-thunk with toolkit. Have a great day!

  • @dushananuradha1098
    @dushananuradha1098 3 роки тому +2

    Thanks a lot for your clear explanation...! Good luck!

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

      Happy to be of help! And thank you!:)

  • @wishmeheaven
    @wishmeheaven 8 місяців тому

    Great teaching!

  • @Elator11777
    @Elator11777 3 роки тому +2

    With book.push you are mutating the state, which is a no in redux, or does slice allow that?

    • @RaulTerhes
      @RaulTerhes  3 роки тому +2

      Hey there! :) It is true that with .push you are mutating the state and you should never do that in Redux. However redux-toolkit uses the immer library to make sure that your mutations of the state are actually made immutable when they reach the redux store. You can check the docs here for more info: redux-toolkit.js.org/api/createReducer#direct-state-mutation. This is the part of the docs for createReducer, but the createSlice uses createReducer in the background.

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

      @@RaulTerhes thank you! I will try the redux toolkit

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

    So we can also make the fetch request in the slices ? Or where

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

    Hello Raul, Please how can we clear the input fields in the form, after adding a book?

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

      Hello Stanley! In the AddBook component, addBookHandler method, after dispatching the addBook action you can add:
      setTitle("");
      setAuthor("");
      setRating("5");

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

      @@RaulTerhes Thanks so much Raul!!!! You are a Legend!!. Thanks so much.

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

    what about action that accept two parameter, ex: id , details

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

    Thank you sir !

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

    Wonderful video

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

    Learn the basic of Redux Toolkit. Check out the whole playlist: ua-cam.com/video/r5c9zvrzmFs/v-deo.html&ab_channel=RaulTerhes

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

    Cool!!!

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

    vs code theme ???

  • @BekzatTulebaev
    @BekzatTulebaev 11 місяців тому

    i see nothing your zoom is the best

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

    thanks