Hi, I'm a Redux maintainer and creator of Redux Toolkit.
First, thanks for writing this post! It's great to see that folks are trying Redux Toolkit and that it works well for them.
Second, you should really cover createSlice, in this article as well. Most folks won't even need to use createAction or createReducer themselves, because createSlice will call those internally and generate all the action creators and action types for you automatically.
Hey Mark! Thank you for reading the article and leaving your feedback! I do think that most people should use createSlice too! I’ll cover that in another post and link it from here ☺️
Hi Mark! You said that I can use createSlice to generate the action creators and action types automatically. So in which moment should I use createAction and createReducer?
Hi, I'm a Redux maintainer and creator of Redux Toolkit.
First, thanks for writing this post! It's great to see that folks are trying Redux Toolkit and that it works well for them.
Second, you should really cover
createSlice,
in this article as well. Most folks won't even need to usecreateAction
orcreateReducer
themselves, becausecreateSlice
will call those internally and generate all the action creators and action types for you automatically.If you've got any other questions, let me know!
Hey Mark! Thank you for reading the article and leaving your feedback! I do think that most people should use createSlice too! I’ll cover that in another post and link it from here ☺️
Hi Mark! You said that I can use createSlice to generate the action creators and action types automatically. So in which moment should I use createAction and createReducer?
Most of the time, you shouldn't even need to call
createAction
orcreateReducer
yourself -createSlice
is all you'd need.