Skip to content

Commit ce92bc2

Browse files
authored
docs: correct spelling mistakes (TanStack#716)
1 parent da29536 commit ce92bc2

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

docs/src/pages/docs/guides/default-query-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ id: default-query-function
33
title: Default Query Function
44
---
55

6-
If you find yourself wishing for whatever reason that you could just share the same query function for your entire app and just use query keys to to identify what it should fetch, you can do that by providing a **default query function** to React Query:
6+
If you find yourself wishing for whatever reason that you could just share the same query function for your entire app and just use query keys to identify what it should fetch, you can do that by providing a **default query function** to React Query:
77

88
```js
9-
// Define a default query function that will recieve the query key
9+
// Define a default query function that will receive the query key
1010
const defaultQueryFn = async key => {
1111
const { data } = await axios.get(`https://jsonplaceholder.typicode.com${key}`)
1212
return data

docs/src/pages/docs/guides/paginated-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Rendering paginated data is a very common UI pattern to avoid overloading bandwi
77

88
Consider the following example where we would ideally want to increment a pageIndex (or cursor) for a query. If we were to use `useQuery`, it would technically work fine, but the UI would jump in and out of the `success` and `loading` states as different queries are created and destroyed for each page or cursor. By using `usePaginatedQuery` we get a few new things:
99

10-
- Instead of `data`, you should use `resolvedData` instead. This is the data from the last known successful query result. As new page queries resolve, `resolvedData` remains available to show the last page's data while a new page is requested. When the new page data is received, `resolvedData` get's updated to the new page's data.
10+
- Instead of `data`, you should use `resolvedData` instead. This is the data from the last known successful query result. As new page queries resolve, `resolvedData` remains available to show the last page's data while a new page is requested. When the new page data is received, `resolvedData` gets updated to the new page's data.
1111
- If you specifically need the data for the exact page being requested, `latestData` is available. When the desired page is being requested, `latestData` will be `undefined` until the query resolves, then it will get updated with the latest pages data result.
1212

1313
```js

docs/src/pages/docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ If you're not using a module bundler or package manager we also have a global ("
3131
<script src="https://unpkg.com/react-query/dist/react-query.production.min.js"></script>
3232
```
3333

34-
Once you've added this you will have access to the `window.ReactQuery` object and it's exports.
34+
Once you've added this you will have access to the `window.ReactQuery` object and its exports.
3535

3636
> This installation/usage requires the [React CDN script bundles](https://reactjs.org/docs/cdn-links.html) to be on the page as well.

docs/src/pages/docs/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Simply put, React Query makes **fetching, caching, synchronizing and updating se
77

88
## Motivation
99

10-
Out of the box, React applications **do not** come with an opinionated way of fetching or updating data from your components so developers end up building their own ways of fetching data. This usually means cobbling together component-based state and effecs using React hooks, or using more general purpose state management libraries to store and provide asynchronous data throughout their apps.
10+
Out of the box, React applications **do not** come with an opinionated way of fetching or updating data from your components so developers end up building their own ways of fetching data. This usually means cobbling together component-based state and effect using React hooks, or using more general purpose state management libraries to store and provide asynchronous data throughout their apps.
1111

1212
While most traditional state management libraries are great for working with client state, they are **not so great at working with async or server state**. This is because **server state is totally different**. For starters, server state:
1313

examples/default-query-function/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ReactDOM from "react-dom";
44
import axios from "axios";
55
import { useQuery, queryCache, ReactQueryConfigProvider } from "react-query";
66

7-
// Define a default query function that will recieve the query key
7+
// Define a default query function that will receive the query key
88
const defaultQueryFn = async (key) => {
99
const { data } = await axios.get(
1010
`https://jsonplaceholder.typicode.com${key}`

0 commit comments

Comments
 (0)