Skip to content
项目

关于

模块化、易于理解的基于 Redux 的状态管理,所需样板代码极少

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Redux Box

Redux Box

A modular, batteries-included container for Redux + Redux-Saga applications.
Less boilerplate. Cleaner reducers. Sagas already wired up.

npm version license last commit

Read the Docs

👉 anish000kumar.github.io/redux-box


Install

npm install redux-box
# or
yarn add redux-box

A taste

// store/counter.js
import { createModule } from 'redux-box';

export default createModule({
  state: { count: 0 },
  mutations: {
    INCREMENT: state => { state.count += 1; },
  },
});

// store/index.js
import { createStore } from 'redux-box';
import counter from './counter';

export default createStore({ counter });

That's a complete Redux store. Mutations look mutable but are made immutable under the hood by Immer; sagas, devtools, and middleware are wired up for you.

➡️ Head over to the full documentation for the guide, examples, recipes, and API reference.

License

MIT © Anish Kumar

探索相关项目

加载中…