ShouldRevalidateFunction
react-router

ShouldRevalidateFunction interface

ShouldRevalidateFunction(args): boolean

Parameters

  • args: ShouldRevalidateFunctionArgs 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.
Docs and examples CC 4.0