Skip to content

Commit

Permalink
docs: fix typo (quey -> query) (#4813)
Browse files Browse the repository at this point in the history
  • Loading branch information
mascii committed Jan 13, 2023
1 parent e33bda3 commit 832d4fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/react/guides/caching.md
Expand Up @@ -27,7 +27,7 @@ Let's assume we are using the default `cacheTime` of **5 minutes** and the defau
- When the request completes successfully, the cache's data under the `['todos']` key is updated with the new data, and both instances are updated with the new data.
- Both instances of the `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` query are unmounted and no longer in use.
- Since there are no more active instances of this query, a cache timeout is set using `cacheTime` to delete and garbage collect the query (defaults to **5 minutes**).
- Before the cache timeout has completed, another instance of `useQuery({ queryKey: ['todos'], queyFn: fetchTodos })` mounts. The query immediately returns the available cached data while the `fetchTodos` function is being run in the background. When it completes successfully, it will populate the cache with fresh data.
- Before the cache timeout has completed, another instance of `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` mounts. The query immediately returns the available cached data while the `fetchTodos` function is being run in the background. When it completes successfully, it will populate the cache with fresh data.
- The final instance of `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` unmounts.
- No more instances of `useQuery({ queyKey: ['todos'], queryFn: fetchTodos })` appear within **5 minutes**.
- No more instances of `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` appear within **5 minutes**.
- The cached data under the `['todos']` key is deleted and garbage collected.
2 changes: 1 addition & 1 deletion docs/react/guides/placeholder-query-data.md
Expand Up @@ -44,7 +44,7 @@ If the process for accessing a query's placeholder data is intensive or just not
function Todos() {
const placeholderData = useMemo(() => generateFakeTodos(), [])
const result = useQuery({
queyKey: ['todos'],
queryKey: ['todos'],
queryFn: () => fetch('/todos'),
placeholderData,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-query/README.md
Expand Up @@ -79,5 +79,5 @@ Visit https://tanstack.com/query/v4/docs/adapters/vue-query
const id = ref(1);
const enabled = ref(false);

const query = useQuery({ queyKey: ["todos", id], queryFn: () => getTodos(id), enabled });
const query = useQuery({ queryKey: ["todos", id], queryFn: () => getTodos(id), enabled });
```

0 comments on commit 832d4fb

Please sign in to comment.