Skip to content

Instantly share code, notes, and snippets.

@anchetaWern
Created May 31, 2019 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anchetaWern/0ece159f24147c31c852d6c4bc08ef02 to your computer and use it in GitHub Desktop.
Save anchetaWern/0ece159f24147c31c852d6c4bc08ef02 to your computer and use it in GitHub Desktop.
React Native Stream Group Chat Tutorial: Async foreach
// 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