1const handleAsync = () => {
2 return function(dispatch) {
3 dispatch(requestingData())
4
5 setTimeout(function() {
6 let data = {
7 users: ['Jeff', 'William', 'Alice']
8 }
9 // Dispatch received data action here(just a placeholder for API)
10
11 dispatch(receivedData(data))
12 }, 2500);
13 }
14};
15