-
Hi everyone, I am playing around with Incremental Static Regeneration on one of my projects where one of the main goals is to minimise calls to the database/API. I have an Edit functionality on the project that allows users to update an entry on the database and then view the updated version on the Next.js app (which uses Incremental Static Regeneration). So ideally, I would only want to re-generate that page when a user actually updates the entry corresponding to that page on the database. Is there any way to "manually" re-generate specific pages, instead of re-building the entire site or incrementally regenerating with something like I am not entirely sure what the best path here would be, and I would appreciate any suggestions! Thank you :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There currently isn't a way to programmatically revalidate pages via something like a webhook or API. In the meantime, one option would be to serve a static loading state from the server followed by client-side rendering.
Example of an edit modal which mutates an SWR cache: https://github.com/leerob/fastfeedback/blob/master/components/EditSiteModal.js#L38 |
Beta Was this translation helpful? Give feedback.
There currently isn't a way to programmatically revalidate pages via something like a webhook or API. In the meantime, one option would be to serve a static loading state from the server followed by client-side rendering.
Example of an edit modal which mutates an SWR cache: https://github.com/leerob/fastfeedback/blob/master/compone…