Currently working on incorporating Incremental Static Regeneration into a Next.js project.
The index page displays a list of posts with the revalidate: 1
parameter in the getStaticProps()
function.
Another page contains a form for editing post titles. Upon submission, an AJAX call is made to update the record in the database.
However, after editing a post title and returning to the post list page using next/link
, the data appears outdated. Reloading the page still shows old information, but upon clicking the link again, the data is finally updated.
Wondering if I might be overlooking something or if this behavior is to be expected?
For reference, there is a repository that replicates this issue (using "product" instead of "post"):