From 158e9498872908498ea59a60d2b470b1fe09b0ea Mon Sep 17 00:00:00 2001 From: webbalea <93341350+webbalea@users.noreply.github.com> Date: Tue, 14 Jun 2022 18:16:44 +0300 Subject: [PATCH] Update useQueries hook example I have used as an example "staleTime: Infinity", but it can be whatever makes sense here. I've had a hard time figuring out where to put my options just by reading the explanation below the code example. --- docs/reference/useQueries.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/useQueries.md b/docs/reference/useQueries.md index bda41f3fa0..ce3243e541 100644 --- a/docs/reference/useQueries.md +++ b/docs/reference/useQueries.md @@ -8,8 +8,8 @@ The `useQueries` hook can be used to fetch a variable number of queries: ```js const results = useQueries({ queries: [ - { queryKey: ['post', 1], queryFn: fetchPost }, - { queryKey: ['post', 2], queryFn: fetchPost } + { queryKey: ['post', 1], queryFn: fetchPost, staleTime: Infinity}, + { queryKey: ['post', 2], queryFn: fetchPost, staleTime: Infinity} ] }) ```