|
1 |
| -# Redux Starter Kit |
2 |
| - |
3 |
| -[](https://travis-ci.org/reduxjs/redux-starter-kit) |
4 |
| -[](https://www.npmjs.com/package/redux-starter-kit) |
5 |
| -[](https://www.npmjs.com/package/redux-starter-kit) |
6 |
| - |
7 |
| -**A simple set of tools to make using Redux easier** |
8 |
| - |
9 |
| -`npm install redux-starter-kit` |
10 |
| - |
11 |
| -(Special thanks to Github user @shotak for donating to the package name.) |
12 |
| - |
13 |
| -### Purpose |
14 |
| - |
15 |
| -The `redux-starter-kit` package is intended to help address three common complaints about Redux: |
16 |
| - |
17 |
| -- "Configuring a Redux store is too complicated" |
18 |
| -- "I have to add a lot of packages to get Redux to do anything useful" |
19 |
| -- "Redux requires too much boilerplate code" |
20 |
| - |
21 |
| -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. |
22 |
| - |
23 |
| -This package is _not_ intended to solve every possible complaint about 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. |
24 |
| - |
25 |
| -### What's Included |
26 |
| - |
27 |
| -`redux-starter-kit` includes: |
28 |
| - |
29 |
| -- 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. |
30 |
| -- 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`. |
31 |
| -- 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. |
32 |
| -- 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. |
33 |
| -- 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)). |
34 |
| - |
35 |
| -## Documentation |
36 |
| - |
37 |
| -The `redux-starter-kit` docs are now published at **https://redux-starter-kit.js.org**. |
38 |
| - |
39 |
| -We're currently expanding and rewriting our docs content - check back soon for more updates! |
| 1 | +# Redux Starter Kit |
| 2 | + |
| 3 | +[](https://travis-ci.org/reduxjs/redux-starter-kit) |
| 4 | + |
| 5 | +[](https://www.npmjs.com/package/redux-starter-kit) |
| 6 | + |
| 7 | +**A simple set of tools to make using Redux easier** |
| 8 | + |
| 9 | +`npm install redux-starter-kit` |
| 10 | + |
| 11 | +(Special thanks to Github user @shotak for dona |
| 12 | + |
| 13 | +**A simple set of tools to make using Redux easier** |
| 14 | + |
| 15 | +`npm install redux-starter-kit` |
| 16 | + |
| 17 | +(Special thanks to Github user @shotak for donating to the package name.) |
| 18 | + |
| 19 | +### Purpose |
| 20 | + |
| 21 | +The `redux-starter-kit` package is intended to help address three common complaints about Redux: |
| 22 | + |
| 23 | +- "Configuring a Redux store is too complicated" |
| 24 | +- "I have to add a lot of packages to get Redux to do anything useful" |
| 25 | +- "Redux requires too much boilerplate code" |
| 26 | + |
| 27 | +We can't solve every use case, but in the spirit of le complaint about Redux, and is deliberately limited in scope. It and _not_ address concepts like "reusable encapsulated Redux modules", data fetching, folder or file s, 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. |
| 28 | + |
| 29 | +This package is _not_ intended to solve every possible complaint about 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. |
| 30 | + |
| 31 | +### What's Included |
| 32 | + |
| 33 | +`redux-starter-kit` includes: |
| 34 | + |
| 35 | +- 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. |
| 36 | +- 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 e selector functions. |
| 37 | +- An improved version of the wid to let you write simpler immutable updates with normal mutative code, like `state.todos[3].completed = true`. |
| 38 | +- 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. |
| 39 | +- 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. |
| 40 | +- 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 n for more updates!). |
| 41 | + |
| 42 | +## Documentation |
| 43 | + |
| 44 | +The `redux-starter-kit` docs are now published at **tent - check back soon for more **. |
| 45 | + |
| 46 | +We're currently expanding and rewriting our docs content - check back soon for more updates! |
0 commit comments