Loader snapshot
Tag: todos.summary via staticData
- Total todos
- 13
- oRPC writes
- 2
- Server Fn writes
- 11
Latest: FFFF
Basics
Declare tags on route staticData. When the server invalidates matching tags, the loader re-runs automatically — no router.invalidate() needed.
Tag: todos.summary via staticData
Latest: FFFF
The server function invalidates appTags.todos() which includes todos.summary.
// Without query-tags: loaders never refresh
export const Route = createFileRoute('/todos')({
loader: () => fetchSummary(),
component: TodoSummary,
})
// After a mutation, the loader data is stale.
// You need router.invalidate() or full page reload.
// No way to target specific loaders.// With query-tags: loaders refresh via tags
export const Route = createFileRoute('/todos')({
staticData: { tags: [appTags.todos.summary()] },
loader: () => fetchSummary(),
component: TodoSummary,
})
// Server invalidates appTags.todos() →
// this loader re-runs automatically.
// No router.invalidate(). No page reload.