Open standrd opened 3 years ago
Thanks for the feedback! I've intentionally used an array within getData
, as I want to be able to fetch data from multiple data sources, because I want to destructure them into their own variables for cleanup, but only if all the data successfully loads. See line 87 with the Promise.all
. I could abstract what happens in the map into its own function, but I don't think that would benefit me — it's only being used inside getData
anyway.
https://github.com/didiercatz/frontend-data/blob/2ce8e08b10a3533192553185a683370433fe14f8/src/modules/data.js#L12-L20
Repository
Wiki
Live demo
I can see where it's going, and from the sketch in your wiki it's clear what you're going to make. The live demo itself however wouldn't show this to me right now as a new user looking at it. It will require better labeling and data updating dynamically, but I assume this is something you still need to get to.