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?
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!
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.
Hello Stanley! In the AddBook component, addBookHandler method, after dispatching the addBook action you can add: setTitle(""); setAuthor(""); setRating("5");
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?
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!
Thanks a lot for your clear explanation...! Good luck!
Happy to be of help! And thank you!:)
Great teaching!
With book.push you are mutating the state, which is a no in redux, or does slice allow that?
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.
@@RaulTerhes thank you! I will try the redux toolkit
So we can also make the fetch request in the slices ? Or where
Hello Raul, Please how can we clear the input fields in the form, after adding a book?
Hello Stanley! In the AddBook component, addBookHandler method, after dispatching the addBook action you can add:
setTitle("");
setAuthor("");
setRating("5");
@@RaulTerhes Thanks so much Raul!!!! You are a Legend!!. Thanks so much.
what about action that accept two parameter, ex: id , details
Thank you sir !
Wonderful video
Thank you! Cheers!
Learn the basic of Redux Toolkit. Check out the whole playlist: ua-cam.com/video/r5c9zvrzmFs/v-deo.html&ab_channel=RaulTerhes
Cool!!!
vs code theme ???
i see nothing your zoom is the best
thanks
Glad you enjoyed it! :)