Last active
June 15, 2020 06:15
-
-
Save vldvel/fef77236367944b2770a6ce1712faa1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getWeatherDataTimedout = async dispatch => { | |
await getWeatherData()(dispatch); | |
setTimeout(() => updateMessages(dispatch), 30 * 1000); | |
}; | |
const getWeatherDataMiddleware = ({ dispatch }) => next => { | |
getWeatherDataTimedout(dispatch); | |
return action => next(action); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment