State Management · Senior · Question 41 of 75

How do you prevent a loader from re-running after every action on the page?

Explanation

By default all active loaders revalidate after an action, which is safe but can be wasteful. shouldRevalidate({ formAction, currentUrl, nextUrl, defaultShouldRevalidate }) lets you opt out selectively.

Further reading

Problem with a question

State Management · Senior · question 41

Test yourself

Take the State Management · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz