Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

useMutate should take a debounce parameter #379

Open
malko opened this issue Nov 18, 2021 · 1 comment
Open

useMutate should take a debounce parameter #379

malko opened this issue Nov 18, 2021 · 1 comment

Comments

@malko
Copy link

malko commented Nov 18, 2021

Is your feature request related to a problem? Please describe.
I find useful the debounce parameter in useGet and would appreciate to have it on useMutate too, or i'm i missing the point to achieve this.

Describe the solution you'd like
I'd like to be able to pass a debounce parameter to useMutate like this:

const {mutate, error} = useMutate({
  verb: 'PATCH',
  path: ({id}) => `/entity/${id}`,
  debounce: true
})

Describe alternatives you've considered
using useDebounceCallback may be an option, but it force me to have another dependencies I don't require otherwise at the moment.

@fabien0102
Copy link
Contributor

Indeed, we don’t have any debounce property on useMutate.
So far I don’t really have the time to work on this project anymore but I’m always happy to review PR if you want to take care of this 😃

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants