When partial pre-rendering
is enabled, it corrupts the functionality of the pages without partial pre-rendering. It makes them trigger the fetch function twice while revalidating.
- Run backend server with
npm run backend
. - In the separate terminal build and start the app with
npm run build && npm run start
. - Open http://localhost:3000/count in the browser.
- Wait for the
Cache state
field to change tostale
. - Reload the page twice to see the revalidated page with
Cache state: fresh
. - Optionally, open the terminal with the backend and see that in logs
/count
route was triggered twice.
The value should be greater than before by 1
The value is greater than before by 2, meaning that the fetch was triggered twice.
Revalidation on-demand works correctly.