Get organized - Create a
thunks.jsor a folder
./thunks/and the appropriate file names to group the related thunks.
action-creatorsfrom the appropriate file(s) into your thunk file.
Write your thunk(s).
Create a new
reduceror update other
reducersas appropriate and import any needed
4.1. If creating a new
importit to store.js and add the
reducerto your reducers object.
In the component needing the
thunk, import the
thunk, add it to the appropriate
mapProps, and place the
thunkfunction were needed in the component.