Skip to content

Commit 6a09010

Browse files
committed
Fix assorted docs tweaks
1 parent 97ae013 commit 6a09010

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

docs/api/getDefaultMiddleware.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const store = configureStore({
5555
// Store has all of the default middleware added, _plus_ the logger middleware
5656
```
5757

58-
It is preferable to use the chainable `.concat(...)` and `.prepend(...)` methods of the returned `Tuple` instead of the array spread operator, as the latter can lose valuable type information under some circumstances.
58+
It is preferable to use the chainable `.concat(...)` and `.prepend(...)` methods of the returned `Tuple` instead of the array spread operator, as the latter can lose valuable TS type information under some circumstances.
5959

6060
## Included Default Middleware
6161

docs/migrations/1.x-to-2.x.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,11 @@ In practice, we hope these are reasonable tradeoffs. Creating thunks inside of `
499499
Here's what the new callback syntax looks like:
500500

501501
```ts
502-
const createSlice = buildCreateSlice({
502+
const createSliceWithThunks = buildCreateSlice({
503503
creators: { asyncThunk: asyncThunkCreator },
504504
})
505505

506-
const todosSlice = createSlice({
506+
const todosSlice = createSliceWithThunks({
507507
name: 'todos',
508508
initialState: {
509509
loading: false,

docs/rtk-query/usage/customizing-queries.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,13 @@ const axiosBaseQuery =
376376
> =>
377377
async ({ url, method, data, params, headers }) => {
378378
try {
379-
const result = await axios({ url: baseUrl + url, method, data, params, headers })
379+
const result = await axios({
380+
url: baseUrl + url,
381+
method,
382+
data,
383+
params,
384+
headers,
385+
})
380386
return { data: result.data }
381387
} catch (axiosError) {
382388
const err = axiosError as AxiosError
@@ -608,7 +614,7 @@ The `retry` utility has a `fail` method property attached which can be used to b
608614

609615
```ts title="Bailing out of error re-tries"
610616
import { createApi, fetchBaseQuery, retry } from '@reduxjs/toolkit/query/react'
611-
import type { FetchArgs } from '@reduxjs/toolkit/dist/query/fetchBaseQuery'
617+
import type { FetchArgs } from '@reduxjs/toolkit/query'
612618
interface Post {
613619
id: number
614620
name: string

0 commit comments

Comments
 (0)