Hard-Reducer类型友好的 Redux 辅助工具

Hard-Reducer 提供了一个强类型的简洁门面,让 Redux 使用体验更加友好。通过以下命令安装它:npm install hard-reducer --saveyarn add hard-reducerHard-Reducer 的主要设计思想是确保类型安全的接口,避免多余的类型字符串定义,保留 Redux 的 combineReducers() 功能,以便处理标准的 Flux 操作对象 { type: string, payload: Payload }。以下示例展示了它在 Flowtype 和 Typescript 中的兼容性:

/* @flow */
// Flow 的魔法注释,Typescript 会忽略它
import { buildActi

更多代码示例详见文档。

zip
hard-reducer-master.zip 预估大小:21个文件
folder
hard-reducer-master 文件夹
file
circle.yml 962B
file
.flowconfig 93B
file
yarn.lock 113KB
file
.prettierignore 24B
folder
src 文件夹
file
createReducer.js 1KB
file
index.js 142B
file
buildActionCreator.js 2KB
file
.babelrc 33B
file
index.js.flow 1KB
folder
test 文件夹
file
thunk.js 1KB
file
flow.js 2KB
file
typescript.ts 3KB
file
async.js 1KB
file
with-redux.js 1KB
file
index.js 88B
file
README.md 6KB
file
index.d.ts 2KB
file
ChangeLog.md 667B
file
.gitignore 29B
file
index.js 34B
file
package.json 1KB
zip 文件大小:50.65KB