From b393806713971d8c116222c11ea6364b44ada1d1 Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Fri, 4 Nov 2022 12:49:50 +1300 Subject: [PATCH] docs(guides): correct typo --- docs/guides/caching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/caching.md b/docs/guides/caching.md index 3daa9cbc03..bbaf0ee2aa 100644 --- a/docs/guides/caching.md +++ b/docs/guides/caching.md @@ -20,7 +20,7 @@ Let's assume we are using the default `cacheTime` of **5 minutes** and the defau - Since no other queries have been made with the `['todos']` query key, this query will show a hard loading state and make a network request to fetch the data. - When the network request has completed, the returned data will be cached under the `['todos']` key. - The hook will mark the data as stale after the configured `staleTime` (defaults to `0`, or immediately). -- A second instance of `useQuery({ queyKey: ['todos'], queryFn: fetchTodos })` mounts elsewhere. +- A second instance of `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` mounts elsewhere. - Since the cache already has data for the `['todos']` key from the first query, that data is immediately returned from the cache. - The new instance triggers a new network request using its query function. - Note that regardless of whether both `fetchTodos` query functions are identical or not, both queries' [`status`](../reference/useQuery) are updated (including `isFetching`, `isLoading`, and other related values) because they have the same query key.