What is the best way to solve this UI usecase using react hooks - tiles screenshot
I have tiles that each need to make request to backed API REST endpoints. The number of tiles is configurable for every module, so ideally I want to have some configuration with array of items like
{title, text, asyncRequestFunction}
and based on that configuration array I want to do multiple async and concurrent requests to load data. Each tile should show some spinner when the appropriate request is in progress and show data as soon as they arrive, not after all the data are available. Can I solve it by some currently available hooks like react-hooks-async?
What really gets in my way is that react hooks cannot be called in loop.