vercel/spr-landing

Can it work for multiple pages with Link?

Closed this issue · 4 comments

Hi,
I try to add Next`s Link to another sample page, but it ends with a weird error about hooks. Even when I commented out hooks

I create a fork with example https://github.com/PetrSnobelt/spr-landing

Should it work with <Link prefetch, or only SSR is supported?

I believe that's a red-herring. After getting the same error and a bit of digging it seemed like the problem came down to CORS control on the notion API preventing client side calls to getInitialProps. (you are always seeing the server-rendered Next.js when there is a single page).

Yeah. A nice solution here would be to just create our own function to proxy the data, and use fetch. cc @timneutkens for his thoughts as well

I took a stab at it:
#10

ijjk commented

Hey folks! We have upgraded this repo to take advantage of incremental static site generation (iSSG). In short:

  • There’s never a cold boot anymore when accessing the page
  • The page gets incrementally re-built asynchronously
  • Always fast & available

This is thanks to Next.js' new hooks for static site generation, see the RFC here, where you can learn more about how this works.

I’m closing this issue for now as it’s no longer applicable. Feel free to ping me with any questions.