Skip to content

Deduplicate requests #608

Jun 24, 2020 · 4 comments · 11 replies
Discussion options

You must be logged in to vote

React Query does this automatically by tracking and sharing promises via the query key. So if 3 requests to fetch the same query are made close to each other, the first will actually fire, create a promise, and the next two will use the promise created by the first. One request, one promise, three promise resolutions.

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
6 replies
@coryhouse
Comment options

@jacobgoh101
Comment options

@TkDodo
Comment options

@asktree
Comment options

@TkDodo
Comment options

Answer selected by coryhouse
Comment options

You must be logged in to vote
1 reply
@coryhouse
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

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

@je00037
Comment options

@allisonadam81
Comment options

@jgarplind
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants