Redux actions can just return a plain object, not functions, callbacks, or asynchronous processes. For dispatching them through web API such as timeout() method you have to use redux-thunk middleware. It has been created for handling such a process.
- First config redux-thunk through documentation redux-thunk
- Second change your action creator this way:
const yourAction = millisecond => dispatch => { setTimeout(() => { dispatch({ type: 'YOUR_ACTIION_TYPE', payload: yourWhatEverPayload }) }, millisecond)}