You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, useQuery always runs on the client and isLoading on server. Even though we have beautiful Skeleton components, it is not a desirable behavior.
Ultimately we want to render the data on the server. For example, the summary row with price, volume and other important data is considered critical since it might be used not only by users but also by search bots. They rely on server returning a html string with all data in there.
Speaking of performance, rendering data on the server might slow down the First Contentful Paint (FCP) but improve all other metrics, overall improving the performance score.
That will not be easy. We would have to use the code written for app/api directory inline in the server components, possibly duplicating react-query code; to deal with the serialization issues; to just learning how it works in-depth and transferring the knowledge to the team.
The text was updated successfully, but these errors were encountered:
Right now,
useQuery
always runs on the client andisLoading
on server. Even though we have beautiful Skeleton components, it is not a desirable behavior.Ultimately we want to render the data on the server. For example, the summary row with price, volume and other important data is considered critical since it might be used not only by users but also by search bots. They rely on server returning a html string with all data in there.
Speaking of performance, rendering data on the server might slow down the First Contentful Paint (FCP) but improve all other metrics, overall improving the performance score.
References to React Query SSR implementation:
That will not be easy. We would have to use the code written for
app/api
directory inline in the server components, possibly duplicating react-query code; to deal with the serialization issues; to just learning how it works in-depth and transferring the knowledge to the team.The text was updated successfully, but these errors were encountered: