Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ShouldRevalidateFunction

Route shouldRevalidate function signature. This runs after any submission (navigation or fetcher), so we flatten the navigation/fetcher submission onto the arguments. It shouldn't matter whether it came from a navigation or a fetcher, what really matters is the URLs and the formData since loaders have to re-run based on the data models that were potentially mutated.

interface ShouldRevalidateFunction {
(args: {
currentUrl: URL;
currentParams: AgnosticDataRouteMatch["params"];
nextUrl: URL;
nextParams: AgnosticDataRouteMatch["params"];
formMethod?: Submission["formMethod"];
formAction?: Submission["formAction"];
formEncType?: Submission["formEncType"];
formData?: Submission["formData"];
actionResult?: DataResult;
defaultShouldRevalidate: boolean;
}
): boolean;
}

§Call Signatures

§
(args: {
currentUrl: URL;
currentParams: AgnosticDataRouteMatch["params"];
nextUrl: URL;
nextParams: AgnosticDataRouteMatch["params"];
formMethod?: Submission["formMethod"];
formAction?: Submission["formAction"];
formEncType?: Submission["formEncType"];
formData?: Submission["formData"];
actionResult?: DataResult;
defaultShouldRevalidate: boolean;
}
): boolean
[src]