I have a parent component in my react app that makes a call to our api, and the page has a loader whilst its waiting for response. On response, I loop through the data, and I pass each iteration into a child component, that then makes another request based on that data.
Is there a way to keep the parent spinner going, until the child data is loaded?
Currently, it displays the parent, then a split second later, some data attached to the child pops in and its not great for the user.
I am using reactQuery for my api calls.