Skip to content

Commit 8065a7e

Browse files
authored
docs: Typo fixes in Markdown files (#2910)
1 parent c118513 commit 8065a7e

11 files changed

+15
-15
lines changed

docs/src/pages/guides/migrating-to-react-query-3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ If you do not want to refetch immediately, you can define a `staleTime`.
335335

336336
### The `QueryOptions.forceFetchOnMount` option has been replaced by `refetchOnMount: 'always'`
337337

338-
Honestly, we were acruing way too many `refetchOn____` options, so this should clean things up.
338+
Honestly, we were accruing way too many `refetchOn____` options, so this should clean things up.
339339

340340
### The `QueryOptions.refetchOnMount` options now only applies to its parent component instead of all query observers
341341

@@ -348,7 +348,7 @@ The `queryFnParamsFilter` option has been removed because query functions now ge
348348

349349
Parameters can still be filtered within the query function itself as the `QueryFunctionContext` also contains the query key.
350350

351-
### The `QueryOptions.notifyOnStatusChange` option has been superceded by the new `notifyOnChangeProps` and `notifyOnChangePropsExclusions` options.
351+
### The `QueryOptions.notifyOnStatusChange` option has been superseded by the new `notifyOnChangeProps` and `notifyOnChangePropsExclusions` options.
352352

353353
With these new options it is possible to configure when a component should re-render on a granular level.
354354

@@ -585,7 +585,7 @@ const fetches = useIsFetching(['posts'])
585585

586586
#### Core separation
587587

588-
The core of React Query is now fully separated from React, which means it can also be used standalone or in other frameworks. Use the `react-query/core` entrypoint to only import the core functionality:
588+
The core of React Query is now fully separated from React, which means it can also be used standalone or in other frameworks. Use the `react-query/core` entry point to only import the core functionality:
589589

590590
```js
591591
import { QueryClient } from 'react-query/core'

docs/src/pages/guides/query-cancellation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ return (
115115
116116
## Old `cancel` function
117117
118-
Don't worry! The previous cancellation functionality will continue to work. But we do recommend that you move away from [the withdrawn cancelable promise proposal](https://github.com/tc39/proposal-cancelable-promises) to the [new `AbortSignal` interface](#_top) which has been [stardardized](https://dom.spec.whatwg.org/#interface-abortcontroller) as a general purpose construct for aborting ongoing activities in [most browsers](https://caniuse.com/abortcontroller) and in [Node](https://nodejs.org/api/globals.html#globals_class_abortsignal). The old cancel function might be removed in a future major version.
118+
Don't worry! The previous cancellation functionality will continue to work. But we do recommend that you move away from [the withdrawn cancelable promise proposal](https://github.com/tc39/proposal-cancelable-promises) to the [new `AbortSignal` interface](#_top) which has been [standardized](https://dom.spec.whatwg.org/#interface-abortcontroller) as a general purpose construct for aborting ongoing activities in [most browsers](https://caniuse.com/abortcontroller) and in [Node](https://nodejs.org/api/globals.html#globals_class_abortsignal). The old cancel function might be removed in a future major version.
119119
120120
To integrate with this feature, attach a `cancel` function to the promise returned by your query that implements your request cancellation. When a query becomes out-of-date or inactive, this `promise.cancel` function will be called (if available).
121121

docs/src/pages/guides/ssr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ ReactDOM.hydrate(
179179

180180
### Only successful queries are included in dehydration
181181

182-
Any query with an error is automatically excluded from dehydration. This means that the default behaviour is to pretend these queries were never loaded on the server, usually showing a loading state instead, and retrying the queries on the queryClient. This happens regardless of error.
182+
Any query with an error is automatically excluded from dehydration. This means that the default behavior is to pretend these queries were never loaded on the server, usually showing a loading state instead, and retrying the queries on the queryClient. This happens regardless of error.
183183

184184
Sometimes this behavior is not desirable, maybe you want to render an error page with a correct status code instead on certain errors or queries. In those cases, use `fetchQuery` and catch any errors to handle those manually.
185185

docs/src/pages/guides/window-focus-refetching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In rare circumstances, you may want to manage your own window focus events that
3434

3535
```js
3636
focusManager.setEventListener(handleFocus => {
37-
// Listen to visibillitychange and focus
37+
// Listen to visibilitychange and focus
3838
if (typeof window !== 'undefined' && window.addEventListener) {
3939
window.addEventListener('visibilitychange', handleFocus, false)
4040
window.addEventListener('focus', handleFocus, false)

docs/src/pages/plugins/createAsyncStoragePersistor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ persistQueryClient({
4343

4444
### `createAsyncStoragePersistor`
4545

46-
Call this function to create an asyncStoragePersistor that you can use later with `persisteQueryClient`.
46+
Call this function to create an asyncStoragePersistor that you can use later with `persistQueryClient`.
4747

4848
```js
4949
createAsyncStoragePersistor(options: CreateAsyncStoragePersistorOptions)
@@ -55,9 +55,9 @@ createAsyncStoragePersistor(options: CreateAsyncStoragePersistorOptions)
5555
interface CreateAsyncStoragePersistorOptions {
5656
/** The storage client used for setting an retrieving items from cache */
5757
storage: AsyncStorage
58-
/** The key to use when storing the cache to localstorage */
58+
/** The key to use when storing the cache to localStorage */
5959
key?: string
60-
/** To avoid localstorage spamming,
60+
/** To avoid localStorage spamming,
6161
* pass a time in ms to throttle saving the cache to disk */
6262
throttleTime?: number
6363
/** How to serialize the data to storage */

docs/src/pages/reference/QueryClient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ try {
9191

9292
**Options**
9393

94-
The options for `fetchQuery` are exactly the same as those of [`useQuery`](./useQuery), except the following: `enabled, refetchInterval, refetchIntervalInBackground, refetchOnWindowFocus, refetchOnReconnect, notifyOnChangeProps, notifyOnChangePropsExclusions, onSuccess, onError, onSettled, useErrorBoundary, select, suspense, keepPreviousData, placeholderData`; which are stictly for useQuery and useInfiniteQuery. You can check the [source code](https://github.com/tannerlinsley/react-query/blob/361935a12cec6f36d0bd6ba12e84136c405047c5/src/core/types.ts#L83) for more clarity.
94+
The options for `fetchQuery` are exactly the same as those of [`useQuery`](./useQuery), except the following: `enabled, refetchInterval, refetchIntervalInBackground, refetchOnWindowFocus, refetchOnReconnect, notifyOnChangeProps, notifyOnChangePropsExclusions, onSuccess, onError, onSettled, useErrorBoundary, select, suspense, keepPreviousData, placeholderData`; which are strictly for useQuery and useInfiniteQuery. You can check the [source code](https://github.com/tannerlinsley/react-query/blob/361935a12cec6f36d0bd6ba12e84136c405047c5/src/core/types.ts#L83) for more clarity.
9595

9696
**Returns**
9797

docs/src/pages/reference/focusManager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Its available methods are:
2121
import { focusManager } from 'react-query'
2222

2323
focusManager.setEventListener(handleFocus => {
24-
// Listen to visibillitychange and focus
24+
// Listen to visibilitychange and focus
2525
if (typeof window !== 'undefined' && window.addEventListener) {
2626
window.addEventListener('visibilitychange', handleFocus, false)
2727
window.addEventListener('focus', handleFocus, false)

docs/src/pages/reference/hydration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: hydration
55

66
## `dehydrate`
77

8-
`dehydrate` creates a frozen representation of a `cache` that can later be hydrated with `Hydrate`, `useHydrate`, or `hydrate`. This is useful for passing prefetched queries from server to client or persisting queries to localstorage or other persistent locations. It only includes currently successful queries by default.
8+
`dehydrate` creates a frozen representation of a `cache` that can later be hydrated with `Hydrate`, `useHydrate`, or `hydrate`. This is useful for passing prefetched queries from server to client or persisting queries to localStorage or other persistent locations. It only includes currently successful queries by default.
99

1010
```js
1111
import { dehydrate } from 'react-query'

docs/src/pages/reference/useMutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ mutate(variables, {
6969
- `useErrorBoundary: undefined | boolean | (error: TError) => boolean`
7070
- Defaults to the global query config's `useErrorBoundary` value, which is `undefined`
7171
- Set this to `true` if you want mutation errors to be thrown in the render phase and propagate to the nearest error boundary
72-
- Set this to `false` to disable the behaviour of throwing errors to the error boundary.
72+
- Set this to `false` to disable the behavior of throwing errors to the error boundary.
7373
- If set to a function, it will be passed the error and should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`)
7474

7575
**Returns**

docs/src/pages/reference/useQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const result = useQuery({
176176
- `useErrorBoundary: undefined | boolean | (error: TError) => boolean`
177177
- Defaults to the global query config's `useErrorBoundary` value, which is `undefined`
178178
- Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary
179-
- Set this to `false` to disable `suspense`'s default behaviour of throwing errors to the error boundary.
179+
- Set this to `false` to disable `suspense`'s default behavior of throwing errors to the error boundary.
180180
- If set to a function, it will be passed the error and should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`)
181181
- `meta: Record<string, unknown>`
182182
- Optional

src/react/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function shouldThrowError<TError>(
88
return _useErrorBoundary(error)
99
}
1010

11-
// Allow useErrorBoundary to override suspense's throwing behaviour
11+
// Allow useErrorBoundary to override suspense's throwing behavior
1212
if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary
1313

1414
// If suspense is enabled default to throwing errors

0 commit comments

Comments
 (0)