Created
May 31, 2019 09:05
-
-
Save anchetaWern/0ece159f24147c31c852d6c4bc08ef02 to your computer and use it in GitHub Desktop.
React Native Stream Group Chat Tutorial: Async foreach
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
// src/screens/Chat.js | |
asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment