swr-devtools icon indicating copy to clipboard operation
swr-devtools copied to clipboard

SWR not detected?

Open StephenSHorton opened this issue 10 months ago • 5 comments

I've opened the SWR dev tool after installing the chrome extension and I don't see any information populating? Screenshot 2024-04-24 at 1 38 06 PM

I'm running a vite app locally and I've refreshed the page, restarted the app and reloaded the developer console to no avail. Using swr v2.2.5. I don't have the swr dev tools node module installed as the docs instructed me not to. Using vite v5.2.8, just a normal TypeScript project.

I have swr hooks all over the page I'm testing this out on. Definitely should pick it up.

StephenSHorton avatar Apr 24 '24 19:04 StephenSHorton

me too.

Adicwu avatar Jun 20 '24 07:06 Adicwu

On my side, only the Chrome extension doesn't work (on Brave and Chrome browsers) ... same as the screenshot above.

The Firefox extension seems to work fine.

(NextJS 14.2.2, typescript 5.4.5, no swr-devtools installed)

yllieth avatar Jun 24 '24 19:06 yllieth

I have the same issue.

I'm using NextJS 14.2.4 and pre-fetching data with SSR. Using useSWR on client components.

@yllieth Yep, it works fine on Firefox.

medinam981 avatar Jul 24 '24 02:07 medinam981

I was able to make it work with Firefox but I'm still unable to use SWR dev tool with Chrome. Is there a plan to fix it for Chrome?

arlejeun avatar Jul 25 '24 13:07 arlejeun

If you are using v2, you still need to wrap your application with <SWRDevTools> Like in this example https://github.com/koba04/swr-devtools/blob/main/examples/swr-devtools-demo/pages/_app.tsx If you look at package.json it uses "swr": "^2.0.0", and also wraps the application

byrchenko avatar Oct 09 '24 12:10 byrchenko