Hey, Thanks for appreciation😄
Have you learned the basic Redux without this redux-toolkit. If you haven't then I'd suggest you to try redux without redux-toolkit you'll get the whole idea of how redux works.
here is the article which I have wrote which explains Redux in simple terms,👇 dev.to/codebucks/what-is-redux-sim...
If you have any doubt in this article, reply with specific code or location where you can't understand 😉
Thank you for reply, I am confused about reducer.js line 51. I don't see any actions in addTodoReducer object, it is returned by createSlice(), which should be {name:, initialState:, reducers}.
I checked redux-toolkit.js.org/api/createslice, says createSlice automatically generates the action types and creators that correspond to reducers and state. I think this answered all my questions, in component DisplayTodos, we import addTodos as action creator which will take payload as parameter and return action object. I thought they are reducer functions.
Great that you figured it out yourself🍻, Yes redux-toolkit is a different than simple approach, It will do all the things by itself within createSlice function so we don't have to write more boilerplate code. 😄
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey, Thanks for appreciation😄
Have you learned the basic Redux without this redux-toolkit. If you haven't then I'd suggest you to try redux without redux-toolkit you'll get the whole idea of how redux works.
here is the article which I have wrote which explains Redux in simple terms,👇
dev.to/codebucks/what-is-redux-sim...
If you have any doubt in this article, reply with specific code or location where you can't understand 😉
Thank you for reply, I am confused about reducer.js line 51. I don't see any actions in addTodoReducer object, it is returned by createSlice(), which should be {name:, initialState:, reducers}.
I checked redux-toolkit.js.org/api/createslice, says createSlice automatically generates the action types and creators that correspond to reducers and state. I think this answered all my questions, in component DisplayTodos, we import addTodos as action creator which will take payload as parameter and return action object. I thought they are reducer functions.
Great that you figured it out yourself🍻, Yes redux-toolkit is a different than simple approach, It will do all the things by itself within createSlice function so we don't have to write more boilerplate code. 😄