I have this NextJS site where there is this getStaticProps that load data from Firestore.
I have this:
return {
props: {
allPosts: posts,
},
revalidate: 60,
}
where from what I know will load data from firebase every one minute. However, it doesn't seem to work and data are just not updated.
Is this revalidate an experimental feature? Anyway that I can get it to work? Else I would have to rebuild and export frequently.
If you want Incremental Static Regeneration (basically revalidate
flag for getStaticProps
) then you need to run Next.js server (next start
command), without the server there is nothing that could perform requests, update data and generate new static files.
next export
only generates static files once, with the data that was available at the build time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With