Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch and render critical data on the server #143

Open
VanishMax opened this issue Nov 21, 2024 · 0 comments · May be fixed by #145
Open

Fetch and render critical data on the server #143

VanishMax opened this issue Nov 21, 2024 · 0 comments · May be fixed by #145

Comments

@VanishMax
Copy link
Contributor

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🗄️ Backlog
Development

Successfully merging a pull request may close this issue.

1 participant