TanStackT
TanStack3y ago
1 reply
efficient-indigo

Best way to handle multiple api endpoint calls for dashboard

I am building a dashboard with multiple components. On load of the dashboard, 13 separate api calls are made fetch the data for the dashboard causing the dashboard to render extremely slowly. Eventually the api calls complete and the dashboard renders. The queries are distributed across the components that need them. I've confirmed that the api endpoints are being hit only once and there are no errors. Any suggestions on how to stagger the api calls would be greatly appreciated.

I posted this question in more detail on SO.
https://stackoverflow.com/questions/77632992/multiple-react-query-api-calls-render-dashboard-ui-extremely-slow
Stack Overflow
I am building a react app that has a dashboard and uses react-query. On the initial load of the dashboard there are 13 query calls to multiple api endpoints that fetch the data for all of the various
Multiple react-query api calls render dashboard UI extremely slow
Was this page helpful?