feat: #143: experimentally request summary data on server #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #143
This is a draft of moving data request on server. So far it looks like too much work. All of the changed code only moves the
summary
request to server components. This is how it works:summary
isLoading
in react query. If user has JavaScript disabled in their browser, it would render the html of the summary block normally, without any skeleton loadersHydrationBoundary
component. See the screenshot below – it shows how react-query populates the html with the server-side data that is then taken by the clientSummary
tries touseQuery
, it takes the data from the server instead of making the new requestNow, what do you think of this approach? Should we continue investigating the best pattern of server-side request?