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

Posts Pagination #51

Merged
merged 15 commits into from Nov 17, 2023
Merged

Posts Pagination #51

merged 15 commits into from Nov 17, 2023

Conversation

aaronmbos
Copy link
Owner

@aaronmbos aaronmbos commented Nov 14, 2023

Overview

As the number of posts has increased over time so has the size of the /posts page. During deployment builds I started to see this warning.

Warning: data for page "/posts" is 585 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.

While the route loads fine in most cases, I understand that sending that data amount of data can have a larger impact on users with poor network connections. For that reason, I wanted to move away from statically generating the /posts page.

This PR updates the /posts page to use client-side rendering and pagination to hydrate the page. During development, I also tried out server-side rendering, but I prefer to have most of the page load immediately and simply wait for the request to populate the posts section.

Copy link

vercel bot commented Nov 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
personal-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 2:50am

@aaronmbos aaronmbos merged commit 3682a17 into main Nov 17, 2023
2 checks passed
@aaronmbos aaronmbos deleted the feat/q4-post-pagination branch November 17, 2023 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant