If I use nextjs pre render static generation page then what about the future changed data ? Suppose I use a ecommerce product details page or assume I use this static generation for a blog posts. If tomorrow the product price will be changed or the blog posts will be edited then how to get this updated data. Should I build the project in the server again ?
Surfing the nextjs documentation I found there are some types of rendering available -
- Pre-rendering Static generation
- Static generation without external data
- Static generation with external data. Here some external api is used in build time for fetching data
- Server Side rendering.
In my above question I talked about the way mentioned in point number 1.2 and I asked that if the data will be changed after build then how to fetch it.
Is it possible at all to get updated data without re-build the app in server ?
I am fear to use the point 2 because it may be slower. I think my current pure react app is faster than this way.