Skip to content

Commit a4b621d

Browse files
authored
Merge pull request #63 from reduxjs/devtool-middleware
Add middleware for detecting mutations and non-serializable values
2 parents fdf54a9 + 8387e2c commit a4b621d

14 files changed

+376
-87
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
The `redux-starter-kit` package is intended to help address three common complaints about Redux:
1515

16-
- "Configuring a Redux store is too complicated"
17-
- "I have to add a lot of packages to get Redux to do anything useful"
18-
- "Redux requires too much boilerplate code"
16+
* "Configuring a Redux store is too complicated"
17+
* "I have to add a lot of packages to get Redux to do anything useful"
18+
* "Redux requires too much boilerplate code"
1919

2020
We can't solve every use case, but in the spirit of [`create-react-app`](https://github.com/facebook/create-react-app) and [`apollo-boost`](https://dev-blog.apollodata.com/zero-config-graphql-state-management-27b1f1b3c2c3), we can try to provide some tools that abstract over the setup process and handle the most common use cases, as well as include some useful utilities that will let the user simplify their application code.
2121

@@ -25,11 +25,11 @@ This package is _not_ intended to solve every possible complaint about Redux, an
2525

2626
`redux-starter-kit` includes:
2727

28-
- 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.
29-
- 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`.
30-
- 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.
31-
- 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.
32-
- 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)).
28+
* 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.
29+
* 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`.
30+
* 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.
31+
* 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.
32+
* 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)).
3333

3434
## Documentation
3535

docs/api/createSelector.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ For more specifics, see the [`selectorator` usage documentation](https://github.
1313

1414
```ts
1515
function createSelector(
16-
// Can either be:
17-
// - An array containing selector functions, string keypaths, and argument objects
18-
// - An object whose keys are selector functions and string keypaths
19-
paths : Array<Function | string | Object> | Object<string, string | Function>
16+
// Can either be:
17+
// - An array containing selector functions, string keypaths, and argument objects
18+
// - An object whose keys are selector functions and string keypaths
19+
paths: Array<Function | string | Object> | Object<string, string | Function>
2020
)
2121
```
2222

docs/introduction/quick-start.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ hide_title: true
1111

1212
The **`redux-starter-kit`** package is intended to help address three common concerns about Redux:
1313

14-
- "Configuring a Redux store is too complicated"
15-
- "I have to add a lot of packages to get Redux to do anything useful"
16-
- "Redux requires too much boilerplate code"
14+
* "Configuring a Redux store is too complicated"
15+
* "I have to add a lot of packages to get Redux to do anything useful"
16+
* "Redux requires too much boilerplate code"
1717

1818
We can't solve every use case, but in the spirit of [`create-react-app`](https://github.com/facebook/create-react-app) and [`apollo-boost`](https://dev-blog.apollodata.com/zero-config-graphql-state-management-27b1f1b3c2c3), we can try to provide some tools that abstract over the setup process and handle the most common use cases, as well as include some useful utilities that will let the user simplify their application code.
1919

@@ -27,11 +27,11 @@ you make your Redux code better.
2727

2828
`redux-starter-kit` includes:
2929

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 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)).
3535

3636
## Installation
3737

0 commit comments

Comments
 (0)