koba04 / swr-devtools

A DevTool for SWR

Home Page:https://swr-devtools.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swr-devtools

A DevTools for SWR

A screenshot of SWR Devtools (light theme)

A screenshot of SWR Devtools (dark theme)

This only supports SWR v1 or later versions.

How to use

Install the SWRDevTools extension

(SWR v1) Wrap your application in the SWRDevTools component

This instruction is only required with SWR v1

⚠️ If you use SWR v2 or later versions, you don't need to install swr-devtools and wrap your application. SWR Devtools does it for you.

npm install swr-devtools
# Install peerDependencies
npm install react swr
import { createRoot } from "react-dom/client";
import { SWRDevTools } from "swr-devtools";

createRoot(document.getElementById("app")).render(
  <SWRDevTools>
    <MainApp />
  </SWRDevTools>,
  document.getElementById("app")
);

Packages

package description
swr-devtools A React component to inject your application
swr-devtools-extensions A Chrome extension for the SWR DevTools
swr-devtools-panel A React component for the SWR DevTools panel

Online Demo

https://swr-devtools.vercel.app

LICENSE

MIT

About

A DevTool for SWR

https://swr-devtools.vercel.app

License:MIT License


Languages

Language:TypeScript 97.6%Language:JavaScript 1.4%Language:HTML 0.9%