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

Refactor with SWR #14

Closed
wbunting opened this issue Oct 31, 2019 · 2 comments
Closed

Refactor with SWR #14

wbunting opened this issue Oct 31, 2019 · 2 comments

Comments

@wbunting
Copy link

wbunting commented Oct 31, 2019

should likely be refactored with SWR https://github.com/zeit/swr

possibly blocked on vercel/swr#11

It's good for most blog style content to be ssr for SEO purposes

@ijjk
Copy link
Member

ijjk commented Jan 11, 2020

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.

@ijjk ijjk closed this as completed Jan 11, 2020
@wbunting
Copy link
Author

@ijjk I'm sure it's just the APIs being unstable, but it's unclear to me from your second bullet point exactly how re-builds get triggered.

Eg. One of the nice things about the existing thing was:

  • always serve a cached version of the ssr
  • async revalidate that against possible changes in notion
  • frontend refreshes automatically if the revalidation yields a differnet etag.

It's unclear to me how next build is being triggered by changes in Notion. Is there some way that the page is doing the revalidation by itself in the background? eg:
https://github.com/zeit/spr-landing/blob/master/pages/index.js#L186

It seems like that's a nice feature, but it might only work if you deploy Next.js on Zeit now so the host knows that it has to use the code from getStaticProps to revalidate against?

I could be totally off the mark / things are still in flight so feel free to push back 😄

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

No branches or pull requests

2 participants