Created
January 30, 2020 05:26
-
-
Save luillyfe/7dc473907efa5ef56fa980995a450015 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
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