Replies: 2 comments 1 reply
-
This is an important issue! Thanks for bringing it up. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Is this possible right now? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Implement manual data refresh / revalidation, specifically in SSR mode
Background & Motivation
It is difficult (or impossible?) to re-fetch server side data without reloading the browser or re-routing to the same page. For instance, when a user's name is updated via a form on the page, the
User
object as a whole should be re-fetched from the server that was shared via middlewareAstro.locals
.#228 is similar, but this is regarding the server fetched data and not static pages.
Goals
Provide function(s) to refresh data that was server rendered by referencing either:
It is important to be able to reference the request indirectly, since the data may have been loaded from a layout or from the middleware (#469). I would also appreciate it to work in tandem with #532.
Examples / Inspiration
https://nuxt.com/docs/getting-started/data-fetching#refresh-and-execute
https://kit.svelte.dev/docs/load#rerunning-load-functions-manual-invalidation
https://nextjs.org/docs/app/building-your-application/data-fetching/revalidating#using-on-demand-revalidation
Beta Was this translation helpful? Give feedback.
All reactions