@lipe11
Posted
Very nice!. I wish I knew about leaflet maps when I did mine, looks pretty good and clean.
Regading Promise.all, I think you could omit one of the calls if you get the json in the same promise... like so:
const promises = borders.map(async (borderCountryCode) => {
const result = await fetch(url)
return result.json()
})
const finalData = await Promise.all(promises)
cheers.
Marked as helpful
@userMatMik
Posted
@lipe11
Ty Luis for nice words and for your advice. I will try your solution. Have a great weekend :)