Skip to content

docs: explain shouldRevalidate and call-site revalidation opt-out - #15448

Open
jasperfurniss wants to merge 2 commits into
remix-run:mainfrom
jasperfurniss:docs/should-revalidate-opt-out
Open

docs: explain shouldRevalidate and call-site revalidation opt-out#15448
jasperfurniss wants to merge 2 commits into
remix-run:mainfrom
jasperfurniss:docs/should-revalidate-opt-out

Conversation

@jasperfurniss

@jasperfurniss jasperfurniss commented Aug 27, 2026

Copy link
Copy Markdown

Summary

The Framework Mode route module page documents shouldRevalidate as return true and links out to the typedoc. That seems like a bit of a step down from the v6 shouldRevalidate page, and it never mentions:

  • returning false to skip this route's loader
  • that a child cannot skip root / parent loaders (so fetcher.submit() still revalidates the rest of the tree)
  • inspecting formMethod / formAction / defaultShouldRevalidate
  • call-site defaultShouldRevalidate={false} on Form, Link, useSubmit, fetcher.submit, navigate, and setSearchParams

The call-site API is on the Form and Link reference pages, but it is easy to miss if you start from the route module guide. It was added as unstable_defaultShouldRevalidate in v7.11 and stabilized in v7.15.

Changes

  • Fill in docs/how-to/optimize-revalidation.md (it was a hidden stub; #15431 already links to it)
  • Expand Framework and Data Mode shouldRevalidate sections with opt-out examples and links to that how-to
  • Point Actions, Fetchers, and Resource Routes at the same guidance

Test plan

  • Confirm headings and internal links render on a docs preview
  • Click through Form #defaultshouldrevalidate and the typedoc ShouldRevalidateFunctionArgs link

jasperfurniss and others added 2 commits August 27, 2026 16:21
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant