Skip to content

Getting started

Install the package:

Terminal window
npm install swr-devtools-react

Place <SWRDevtools /> inside your app’s <SWRConfig>:

import { SWRConfig } from 'swr';
import { SWRDevtools } from 'swr-devtools-react';
export function Root() {
return (
<SWRConfig value={{ fetcher }}>
<App />
<SWRDevtools />
</SWRConfig>
);
}

The panel renders nothing in production builds unless you import from swr-devtools-react/production.