Shared fetcher in SWRConfig handling different methods #2367
Unanswered
marco-digennaro
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
i have a SWRConfig with a fetcher.
i made some hooks:
the useRequest is something like this:
So in my page i import my hook to fetch data and to mutate as well.
const { mutate, data } = usePayments();
is there any way to handle GET and POST using the same fetcher added in the config?
Beta Was this translation helpful? Give feedback.
All reactions