1/* Redux-Thunk Action Creator */
2const createAction = () => { type: 'ACTION_TYPE' };
3
4function createAsyncAction() {
5 return (dispatch) => {
6 setTimeout(() => {
7 dispatch(createAction());
8 /* ^ invoke sync or async actions with dispatch */
9 }, 1000);
10 }
11}
12
13/* About Redux-Thunk Actions
14 * redux-thunk allows you to write action creators
15 * that return a function instead of an action
16 */