searchParams Pagination prevents ISR / Static generation #58884
Replies: 3 comments 3 replies
-
@mkoreo have you managed to find a solution? |
Beta Was this translation helpful? Give feedback.
-
Tbh this feels like a massive hole for websites that want to statically render for performance. F.e.: I have a I'd like to also statically render other variants of the page like This isn't possible right now. I know I can use |
Beta Was this translation helpful? Give feedback.
-
This is pretty negative for us—we use search params for some tab states. We had to move all of these out of search params to achieve ISR for landing pages. Why not at opt the base page without search params into ISR? Or better yet, to support the use cases above my comment, give us a way to be selective about which search param combinations (regex?) should be opted into ISR. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Designing my site with Next.js 13/14 App directory, I started of showing results with searchParams pagination.
ex. https://someblog.azerty/greatblogsposts?page=3
That is logical and clear.
However, it prevents any form of static generation for next.js because you have to use searchParams prop in a page.ts file.
The route turns into a dynamic route (which cannot use generateStaticParams as the searchParams page param cannot be adressed).
Should I opt to change it to https://someblog.azerty/greatblogsposts/page-3 instead for best SEO and performance?
Isn't that "weird"?
Beta Was this translation helpful? Give feedback.
All reactions