Next.js Discord

Discord Forum

why renderPageComponent is called after API fetching?

Unanswered
Lilac posted this in #help-forum
Open in Discord
LilacOP
I have a next application (v14.2.2) in app routing, and I use tanstack query to handle API data fetching.
I see poor performance and so I profiled node.js server. I noticed that after the data is re-fetched, renderPageComponent is called, but I can't understand why. The API returns some double values and tanstack useQuery() is called inside some react component.
Is this an expected behavior?

0 Replies