Swr: Devtools

Created on 5 Mar 2020  路  2Comments  路  Source: vercel/swr

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 馃槉

feature request

Most helpful comment

Would be great to work on this once we have https://github.com/vercel/swr/issues/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.

All 2 comments

Would be great to work on this once we have https://github.com/vercel/swr/issues/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.

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.

Was this page helpful?
0 / 5 - 0 ratings