Skip to content

Instantly share code, notes, and snippets.

@luillyfe
Created January 30, 2020 05:26
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 luillyfe/7dc473907efa5ef56fa980995a450015 to your computer and use it in GitHub Desktop.
Save luillyfe/7dc473907efa5ef56fa980995a450015 to your computer and use it in GitHub Desktop.
pokemons.map(async ({ pokemon }) => {
const url = await getPokemon(pokemon.url);
return (
<Suspense fallback={<h1>Loading pokemons...</h1>}>
<GridListTile key={pokemon.name} cols={1}>
<img src={url} alt={pokemon.name} />
</GridListTile>
</Suspense>
);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment