You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TheReduxDevToolsExtensionrecentlyadded [supportforshowingactionstacktraces](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.
An optional array of Redux store enhancers. If included, these will be passed to [the Redux `compose` function](https://redux.js.org/api/compose), and the combined enhancer will be passed to `createStore`.
isSerializable: () =>true// all values will be accepted
31
+
});
32
+
33
+
conststore=configureStore({
34
+
reducer,
35
+
middleware : [serializableMiddleware],
36
+
});
37
+
```
38
+
39
+
### `isPlain`
40
+
41
+
The default function used to determine if a value is considered serializable.
42
+
43
+
Current definition:
44
+
45
+
```js
46
+
functionisPlain(val) {
47
+
return (
48
+
typeof val ==='undefined'||
49
+
val ===null||
50
+
typeof val ==='string'||
51
+
typeof val ==='boolean'||
52
+
typeof val ==='number'||
53
+
Array.isArray(val) ||
54
+
isPlainObject(val)
55
+
)
56
+
}
57
+
```
58
+
59
+
60
+
## Exports from Other Libraries
61
+
62
+
### `createNextState`
13
63
14
64
The default immutable update function from the [`immer` library](https://github.com/mweststrate/immer#api), re-exported here as `createNextState` (also commonly referred to as `produce`)
15
65
16
-
## `combineReducers`
66
+
###`combineReducers`
17
67
18
68
Redux's `combineReducers`, re-exported for convenience. While `configureStore` calls this internally, you may wish to call it yourself to compose multiple levels of slice reducers.
19
69
20
-
## `compose`
70
+
###`compose`
21
71
22
72
Redux's `compose`. It composes functions from right to left.
23
73
This is a functional programming utility. You might want to use it to apply several store custom enhancers/ functions in a row.
Copy file name to clipboardExpand all lines: docs/introduction/quick-start.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,11 @@ you make your Redux code better.
27
27
28
28
`redux-starter-kit` includes:
29
29
30
-
- A `configureStore()` function with simplified configuration options. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.
31
-
- A `createReducer()` utility that lets you supply a lookup table of action types to case reducer functions, rather than writing switch statements. In addition, it automatically uses the [`immer` library](https://github.com/mweststrate/immer) to let you write simpler immutable updates with normal mutative code, like `state.todos[3].completed = true`.
32
-
- A `createAction()` utility that returns an action creator function for the given action type string. The function itself has `toString()` defined, so that it can be used in place of the type constant.
33
-
- A `createSlice()` function that accepts a set of reducer functions, a slice name, and an initial state value, and automatically generates corresponding action creators, types, and simple selector functions.
34
-
- An improved version of the widely used `createSelector` utility for creating memoized selector functions, which can accept string keypaths as "input selectors" (re-exported from the [`selectorator` library](https://github.com/planttheidea/selectorator)).
30
+
- A [`configureStore()` function](./configureStore.md) with simplified configuration options. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.
31
+
- A [`createReducer()` utility](./createReducer.md) that lets you supply a lookup table of action types to case reducer functions, rather than writing switch statements. In addition, it automatically uses the [`immer` library](https://github.com/mweststrate/immer) to let you write simpler immutable updates with normal mutative code, like `state.todos[3].completed = true`.
32
+
- A [`createAction()` utility](./createAction.md) that returns an action creator function for the given action type string. The function itself has `toString()` defined, so that it can be used in place of the type constant.
33
+
- A [`createSlice()` function](./createSlice.md) that accepts a set of reducer functions, a slice name, and an initial state value, and automatically generates corresponding action creators, types, and simple selector functions.
34
+
- An improved version of the widely used [`createSelector` utility](./createSelector.md) for creating memoized selector functions, which can accept string keypaths as "input selectors" (re-exported from the [`selectorator` library](https://github.com/planttheidea/selectorator)).
0 commit comments