Open mwickett opened 3 years ago
I'm thinking about what would be the best way to handle this. I think we should statically generate a landing page with the first (let's say) 20 stories and then lazily load the next stories via an API call as the user goes through the pages.
What do you think?
I think we should statically generate all the paginated pages for now - so use getStaticPaths to retrieve the number of pages (say 20 stories per page) and then use getStaticProps to generate each page.
On my phone but I can share more soon.
We just chose the number 100 out of the air. Do we know where things actually get too big, in terms of page size/download time/browser memory?
We might well be able to bump the number up and give ourselves more time before we have to solve this.
Also, have we discussed the user experience? Are we talking true pagination or infinite scroll?
After more than a decade of Twitter, pagination feels very old school, but maybe there are good UX reasons for it.
We're getting to the point where we have enough stories that we should be paginating the feed page.