docs: explain shouldRevalidate and call-site revalidation opt-out - #15448
Open
jasperfurniss wants to merge 2 commits into
Open
docs: explain shouldRevalidate and call-site revalidation opt-out#15448jasperfurniss wants to merge 2 commits into
jasperfurniss wants to merge 2 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Framework Mode route module page documents
shouldRevalidateasreturn trueand links out to the typedoc. That seems like a bit of a step down from the v6shouldRevalidatepage, and it never mentions:falseto skip this route's loaderroot/ parent loaders (sofetcher.submit()still revalidates the rest of the tree)formMethod/formAction/defaultShouldRevalidatedefaultShouldRevalidate={false}onForm,Link,useSubmit,fetcher.submit,navigate, andsetSearchParamsThe 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_defaultShouldRevalidatein v7.11 and stabilized in v7.15.Changes
docs/how-to/optimize-revalidation.md(it was a hidden stub; #15431 already links to it)shouldRevalidatesections with opt-out examples and links to that how-toTest plan
#defaultshouldrevalidateand the typedocShouldRevalidateFunctionArgslink