question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

swr has already published the version of v1 beta at the npm registry. the v1 version is no longer exposing a global cache object, so I have to find out another way to access the swr cache object.

I guess swr-devtools would require to receive a cache object through an argument like the following.

window.__SWR_DEVTOOLS_EXTENSION__(cache)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
koba04commented, Aug 23, 2021

@shuding Thank you! That looks amazing and I think this covers my use case 👍 I started considering that swr-devtools only supports v1 in the near future.

1reaction
shudingcommented, Aug 22, 2021

Update: I’m working on a new hook to expose the mutate method in vercel/swr#1361, it should cover this use case (as well as many other pain points).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing SWR 1.0
We've also improved the bundling of the package, and it now supports path imports: import useSWR from 'swr' import useSWRInfinite from ...
Read more >
SWR v1 is here: What's new? - LogRocket Blog
SWR is an awesome, well-thought-out, lightweight, and fast data fetching library. It is transport- and protocol-agnostic — it supports both REST ...
Read more >
Releases · vercel/swr - GitHub
Enhanced mutation and optimistic UI capabilities; SWR DevTools; Preload resource; Improved React 18 support. And more! Read our blog post and migration guide: ......
Read more >
Shu on Twitter: "SWR 1.0 is more powerful and lightweight ...
Middleware support makes it incredibly easy to extend the interface & functionalities of SWR hooks. We've built a couple of examples: - Request...
Read more >
Swr NPM
Revalidation on focus; Interval polling; Local mutation; Pagination; TypeScript ready; SSR support; Suspense mode; React Native support; Minimal API ...and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found