DEV Community

Discussion on: Writing modern Redux in 2020 - Redux Toolkit

Collapse
 
markerikson profile image
Mark Erikson

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.

If you've got any other questions, let me know!

Collapse
 
vcapretz profile image
Vitor Capretz

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 ☺️

Collapse
 
wfelippesilva profile image
William Felippe • Edited

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?

Collapse
 
markerikson profile image
Mark Erikson

Most of the time, you shouldn't even need to call createAction or createReducer yourself - createSlice is all you'd need.