State Management · Middle · Question 43 of 75

How do you set a default fetcher and options for all SWR hooks?

Explanation

SWRConfig sets global options (fetcher, revalidateOnFocus, error handlers) and can be nested to override them for a subtree. It can also provide initial fallback data from SSR.

Further reading

Problem with a question

State Management · Middle · question 43

Test yourself

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

Take this quiz