asynch action redux

Solutions on MaxInterview for asynch action redux by the best coders in the world

showing results for - "asynch action redux"
Laura
14 Jul 2020
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