useful functions

(async function() {
const promises:any = [] const favoriteKeysArray = store.getState().weatherState.favoriteKeys
await Promise.all(favoriteKeysArray.map(async(key) => { const weather = await weatherService.getCurrentWeather(key) promises.push(weather[0]) }))
setAllCurrWeather([...promises]) })()