Skip to content

Autosuggest component with useMutation or useQuery? #416

Answered by cherniavskii
A11oW asked this question in General
Discussion options

You must be logged in to vote

You should use useQuery and pass input value as query key variable
To avoid fetching suggestion for same input value too often - tune useQuery cacheTime option

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@teetotum
Comment options

@TkDodo
Comment options

@teetotum
Comment options

@NarenderDhamarlapally
Comment options

Answer selected by A11oW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants