|
3 | 3 | [](https://travis-ci.org/reduxjs/redux-toolkit)
|
4 | 4 | [](https://www.npmjs.com/package/@reduxjs/toolkit)
|
5 | 5 | [](https://www.npmjs.com/package/@reduxjs/toolkit)
|
6 |
| -[](https://www.npmjs.com/package/redux-starter-kit) |
7 | 6 |
|
8 | 7 | **The official, opinionated, batteries-included toolset for efficient Redux development**
|
9 | 8 |
|
@@ -44,16 +43,18 @@ The **Redux Toolkit** package is intended to be the standard way to write Redux
|
44 | 43 |
|
45 | 44 | 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.
|
46 | 45 |
|
47 |
| -This package is _not_ intended to solve every possible use case for Redux, and is deliberately limited in scope. It does _not_ address concepts like "reusable encapsulated Redux modules", data fetching, folder or file structures, managing entity relationships in the store, and so on. |
| 46 | +Because of that, this package is deliberately limited in scope. It does _not_ address concepts like "reusable encapsulated Redux modules", data caching, folder or file structures, managing entity relationships in the store, and so on. |
48 | 47 |
|
49 | 48 | ## What's Included
|
50 | 49 |
|
51 |
| -Redux Toolkit includes: |
| 50 | +Redux Toolkit includes these APIs: |
52 | 51 |
|
53 |
| -- 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. |
54 |
| -- 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`. |
55 |
| -- 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. |
56 |
| -- A `createSlice()` function that accepts a set of reducer functions, a slice name, and an initial state value, and automatically generates a slice reducer with corresponding action creators and action types. |
| 52 | +- `configureStore()`: wraps `createStore` to provide simplified configuration options and good defaults. 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. |
| 53 | +- `createReducer()`: 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`. |
| 54 | +- `createAction()`: generates 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. |
| 55 | +- `createSlice()`: accepts an object of reducer functions, a slice name, and an initial state value, and automatically generates a slice reducer with corresponding action creators and action types. |
| 56 | +- `createAsyncThunk`: accepts an action type string and a function that returns a promise, and generates a thunk that dispatches `pending/resolved/rejected` action types based on that promise |
| 57 | +- `createEntityAdapter`: generates a set of reusable reducers and selectors to manage normalized data in the store |
57 | 58 | - The `createSelector` utility from the [Reselect](https://github.com/reduxjs/reselect) library, re-exported for ease of use.
|
58 | 59 |
|
59 | 60 | ## Documentation
|
|
0 commit comments