Making Websites With Next.js And Strapi - [12] - Incremental Static Regeneration

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024
  • In this episode we are going to talk about new feature in #Next.js 9.5 called Incremental Static Regeneration.
    So in the last episode told you that once you use #getStaticProps your content will not be dynamic, meaning that you would have to rebuild your site every time content from `getStaticProps` changes. Well, since Next.js is developing very fast, this is already not true any more.
    So in this episode I'm going to show you how you can use `getStaticProps` and still have your content change if you update it in #Strapi. So you get the best of both worlds. Yay!
    Code used in this video
    bit.ly/3k1mBdJ
    You can support my work on Patreon
    / watchlearn
    Follow me on Social Media
    Github: github.com/iva...
    Twitter: / ivan_doric
    Instagram: / watchlearntuts
    Facebook: / watchlearntutorials

Комментарии • 16

  • @emF3lipe
    @emF3lipe 4 года назад +2

    Great as always, Ivan! If you're looking for an idea, you can try to deal with Next.js internationalization. Most of YT tutorials about this topic are outdated I think.

  • @lovelyj48
    @lovelyj48 4 года назад +2

    good day thanks alot for sharing this informative video stay safe always

  • @gholamrezadar
    @gholamrezadar 3 года назад +1

    Good tutorial, Thank you

  • @iamdeveloper2580
    @iamdeveloper2580 3 года назад

    What about dynamic routes ? I mean post/[id] is it good ?

  • @sergeyvronskiy134
    @sergeyvronskiy134 4 года назад +1

    Cool feature

  • @hamed4451
    @hamed4451 4 года назад

    Its great, thank you 👍
    Im confused , why there is a delay for show new data? Why it has to refresh twice to show new data?
    And we changed data , all of users have to refresh twice to see new data or not , if one of them refresh and get new data , others can see it?

    • @WatchandLearnTutorials
      @WatchandLearnTutorials  4 года назад

      Well if you always want up to date data then you should use getServerSideProps. I talk about this in the video, that is why you would only use this approach for pages that are not required to have everything always up to date, because it's better and more performant to just load a static page. This approach is middle ground, it's performant and most of the time it will serve static page, that is at the cost of page not always being up to date. And yes once one user gets updated page, the others will too.

    • @hamed4451
      @hamed4451 4 года назад

      @@WatchandLearnTutorials yeah,i know it, i always use it in some pages like about and contact us that data dont change alot,
      So , after data has been changed , i refresh the page(by myself) to get new data to show it to others for first refresh,right?

    • @WatchandLearnTutorials
      @WatchandLearnTutorials  4 года назад

      @@hamed4451 Yup, that is right.