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
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.
Thanks for suggestion ;) I think I will make that my next episode.
good day thanks alot for sharing this informative video stay safe always
Thanks. Glad you liked the video :)
Good tutorial, Thank you
You are welcome :D
What about dynamic routes ? I mean post/[id] is it good ?
What about them?
@@WatchandLearnTutorials is it good to use ISR ?
@@iamdeveloper2580 Sure it is. You can use it on any route you wish.
Cool feature
Cool indeed. ;)
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?
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.
@@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?
@@hamed4451 Yup, that is right.