import { SWRConfig } from 'swr';
const swrConfig = {
fetcher: customFetcher,
onError: (error) => {
// Handle errors globally
},
};
// Wrap your app with SWRConfig
<SWRConfig value={swrConfig}>
<App />
</SWRConfig>
import { SWRConfig } from 'swr';
const swrConfig = {
fetcher: customFetcher,
onError: (error) => {
// Handle errors globally
},
};
// Wrap your app with SWRConfig
<SWRConfig value={swrConfig}>
<App />
</SWRConfig>