Skip to content
Discussion options

You must be logged in to vote

Just gonna throw in a few points that work altogether:

  • You could use ISR, getStaticPaths with fallback: true, and that'll force you to implement the Fallback page by checking useRouter().isFallback for the pages that are not generated at build time
  • Then you could generate, for example, 200 at build time, and then the fallback ISR takes care of generating the rest
    • For example, you could pre-generate the top 5% most visited pages/products
    • The rest can be generated by next/link prefetch as the users navigate around the shop
  • Then the Stock, and other "live" data, could be loaded from the client side, for example using react-query or swr
  • You could also set a revalidate time on the pages
  • Yo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by funkon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants