Skip to content

Commit 4c11ecf

Browse files
committed
Merge remote-tracking branch 'origin/v1.9-integration' into fetchBaseQuery-timeout
2 parents d046888 + c630e83 commit 4c11ecf

File tree

218 files changed

+10032
-7465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+10032
-7465
lines changed
File renamed without changes.

.github/workflows/test-codegen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
strategy:
3333
matrix:
34-
node-version: [12.x]
34+
node-version: ['16.x']
3535

3636
steps:
3737
- uses: actions/checkout@v2

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
strategy:
3030
matrix:
31-
node: ['14.x']
31+
node: ['16.x']
3232

3333
steps:
3434
- name: Checkout repo
@@ -58,7 +58,7 @@ jobs:
5858
strategy:
5959
fail-fast: false
6060
matrix:
61-
node: ['14.x']
61+
node: ['16.x']
6262
steps:
6363
- name: Checkout repo
6464
uses: actions/checkout@v2
@@ -95,8 +95,8 @@ jobs:
9595
strategy:
9696
fail-fast: false
9797
matrix:
98-
node: ['14.x']
99-
ts: ['4.1', '4.2', '4.3', '4.4', '4.5', '4.6.1-rc', 'next']
98+
node: ['16.x']
99+
ts: ['4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7']
100100
steps:
101101
- name: Checkout repo
102102
uses: actions/checkout@v2

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ typesversions
3232

3333
.yalc
3434
yalc.lock
35-
yalc.sig
35+
yalc.sig

.yarn/patches/react-scripts__npm_4.0.2.patch

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/api/configureStore.mdx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,18 @@ For more details on how the `middleware` parameter works and the list of middlew
9898

9999
### `devTools`
100100

101-
If this is a boolean, it will be used to indicate whether `configureStore` should automatically enable support for [the Redux DevTools browser extension](https://github.com/zalmoxisus/redux-devtools-extension).
101+
If this is a boolean, it will be used to indicate whether `configureStore` should automatically enable support for [the Redux DevTools browser extension](https://github.com/reduxjs/redux-devtools).
102102

103103
If it is an object, then the DevTools Extension will be enabled, and the options object will be passed to `composeWithDevtools()`. See
104-
the DevTools Extension docs for [`EnhancerOptions`](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#windowdevtoolsextensionconfig) for
104+
the DevTools Extension docs for [`EnhancerOptions`](https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md) for
105105
a list of the specific options that are available.
106106

107107
Defaults to `true`.
108108

109-
The Redux DevTools Extension recently added [support for showing action stack traces](https://github.com/zalmoxisus/redux-devtools-extension/blob/d4ef75691ad294646f74bca38b973b19850a37cf/docs/Features/Trace.md) that show exactly where each action was dispatched. Capturing the traces can add a bit of overhead, so the DevTools Extension allows users to configure whether action stack traces are captured.
109+
#### `trace`
110110

111+
The Redux DevTools Extension recently added [support for showing action stack traces](https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/Features/Trace.md) that show exactly where each action was dispatched.
112+
Capturing the traces can add a bit of overhead, so the DevTools Extension allows users to configure whether action stack traces are captured by [setting the 'trace' argument](https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md#trace).
111113
If the DevTools are enabled by passing `true` or an object, then `configureStore` will default to enabling capturing action stack traces in development mode only.
112114

113115
### `preloadedState`
@@ -137,7 +139,7 @@ of `[offline, applyMiddleware, devToolsExtension]`.
137139

138140
```ts
139141
// file: reducers.ts noEmit
140-
import { Reducer } from '@reduxjs/toolkit'
142+
import type { Reducer } from '@reduxjs/toolkit'
141143
declare const rootReducer: Reducer<{}>
142144
export default rootReducer
143145
@@ -154,12 +156,12 @@ const store = configureStore({ reducer: rootReducer })
154156

155157
```ts no-transpile
156158
// file: todos/todosReducer.ts noEmit
157-
import { Reducer } from '@reduxjs/toolkit'
159+
import type { Reducer } from '@reduxjs/toolkit'
158160
declare const reducer: Reducer<{}>
159161
export default reducer
160162
161163
// file: visibility/visibilityReducer.ts noEmit
162-
import { Reducer } from '@reduxjs/toolkit'
164+
import type { Reducer } from '@reduxjs/toolkit'
163165
declare const reducer: Reducer<{}>
164166
export default reducer
165167
@@ -169,8 +171,8 @@ import { configureStore } from '@reduxjs/toolkit'
169171
// We'll use redux-logger just as an example of adding another middleware
170172
import logger from 'redux-logger'
171173
172-
// And use redux-batch as an example of adding enhancers
173-
import { reduxBatch } from '@manaflair/redux-batch'
174+
// And use redux-batched-subscribe as an example of adding enhancers
175+
import { batchedSubscribe } from 'redux-batched-subscribe'
174176
175177
import todosReducer from './todos/todosReducer'
176178
import visibilityReducer from './visibility/visibilityReducer'
@@ -194,17 +196,19 @@ const preloadedState = {
194196
visibilityFilter: 'SHOW_COMPLETED',
195197
}
196198
199+
const debounceNotify = _.debounce((notify) => notify())
200+
197201
const store = configureStore({
198202
reducer,
199203
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(logger),
200204
devTools: process.env.NODE_ENV !== 'production',
201205
preloadedState,
202-
enhancers: [reduxBatch],
206+
enhancers: [batchedSubscribe(debounceNotify)],
203207
})
204208
205209
// The store has been created with these options:
206210
// - The slice reducers were automatically passed to combineReducers()
207211
// - redux-thunk and redux-logger were added as middleware
208212
// - The Redux DevTools Extension is disabled for production
209-
// - The middleware, batch, and devtools enhancers were composed together
213+
// - The middleware, batched subscribe, and devtools enhancers were composed together
210214
```

docs/api/createAction.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,13 @@ This has different uses:
149149
150150
### As a TypeScript Type Guard
151151
152-
This `match` method is a [TypeScript type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) and can be used to discriminate the `payload` type of an action.
152+
This `match` method is a [TypeScript type guard](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) and can be used to discriminate the `payload` type of an action.
153153
154154
This behavior can be particularly useful when used in custom middlewares, where manual casts might be neccessary otherwise.
155155
156156
```ts
157-
import { createAction, Action } from '@reduxjs/toolkit'
157+
import { createAction } from '@reduxjs/toolkit'
158+
import type { Action } from '@reduxjs/toolkit'
158159

159160
const increment = createAction<number>('INCREMENT')
160161

@@ -171,8 +172,9 @@ function someFunction(action: Action) {
171172
The `match` method can also be used as a filter method, which makes it powerful when used with redux-observable:
172173
173174
```ts
174-
import { createAction, Action } from '@reduxjs/toolkit'
175-
import { Observable } from 'rxjs'
175+
import { createAction } from '@reduxjs/toolkit'
176+
import type { Action } from '@reduxjs/toolkit'
177+
import type { Observable } from 'rxjs'
176178
import { map, filter } from 'rxjs/operators'
177179

178180
const increment = createAction<number>('INCREMENT')

0 commit comments

Comments
 (0)