Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devtools #291

Closed
timurmaio opened this issue Mar 5, 2020 · 8 comments
Closed

Devtools #291

timurmaio opened this issue Mar 5, 2020 · 8 comments
Labels
devtools feature request New feature or request

Comments

@timurmaio
Copy link

Hello! React-query just released their devtools extension https://github.com/tannerlinsley/react-query-devtools. Do you have such plans in near future? I'm trying to decide which library to use and I almost desided to use swr, but then I saw react-query devtools. I will be grateful for the answer 😊

@shuding shuding added the feature request New feature or request label Jun 6, 2020
@shuding
Copy link
Member

shuding commented Jun 6, 2020

Would be great to work on this once we have #172. Callback APIs can be added so a plugin can execute code in:

  • beforeRevalidate
  • afterRevalidate
  • onError
  • onLoading
  • onSuccess
  • onFocus
  • ...

Therefore, we can create devtools/loggers/etc. on top of SWR.

@corysimmons
Copy link

I'm in the exact same place. SWR's API > react-query's API, but I saw react-query-devtools and was really close to being swayed.

@AshishKapoor
Copy link

FYI here's what I found. https://github.com/jjordy/swr-devtools

@corysimmons
Copy link

Since this thread was created @shuding & others have introduced a middleware layer to SWR:

It looks like @koba04 is currently experimenting with some DevTools: https://github.com/koba04/swr-devtools

You can get the Chrome Extension here: https://chrome.google.com/webstore/detail/swr-devtools/liidbicegefhheghhjbomajjaehnjned

Thanks for all your work on this @shuding and @koba04 ! Very excited!

@rendinjast
Copy link

Hi.
I'm currently working on a devtools based on react-query devtools.
please check it out and if there's any suggestion/idea/issue i will be glad to hear. thanks.

code: https://github.com/rendinjast/swr-devtools
demo: https://codesandbox.io/s/goofy-microservice-ehhkn

@corysimmons
Copy link

@rendinjast Very pretty! 👏 How does it compare to the features @koba04's tool offers?

Also, could you make it available as a Chrome Extension?

@rendinjast
Copy link

rendinjast commented Jan 5, 2022

@corysimmons thank you.

Honesty, when I decided to develop it, I didn't know there's a DevTools for SWR.

Correct me if I'm wrong. I think @koba04's tool is based on handling the cache, but what I did is using Callback APIs in middleware, and it's a lot easier to add feature.
For now besides actions and history there's not much difference. But my goal is to make it as powerful as react-query devtools.
UI is already created, and it's very clean, so I can focus on functionality.

Yes I can, but currently my plan is adding more features. Maybe in the future.


Edit: v0.0.4 added feature: history list & Options Explorer

@koba04
Copy link
Collaborator

koba04 commented Dec 10, 2022

We've had SWRDevTools now 🚀
https://swr.vercel.app/docs/advanced/devtools

@koba04 koba04 closed this as completed Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devtools feature request New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants