@abdulghani/combinereducer 中文文档教程
combineReducers function
这是一个用于 reducer 的轻量级 combineReducers 函数。 适用于 redux
或 useReducer
。
installation
纱线
yarn add @abdulghani/combinereducer
npm
npm install @abdulghani/combinereducer
usage
import combineReducer from "@abdulghani/combinereducer";
import { reducerOne, reducerTwo } from "somewhere";
const combinedReducers = combineReducer({
page: reducerOne,
data: reducerTwo
});
const MyApp = () => {
const [state, dispatch] = useReducer(combinedReducers);
// render
};
combineReducers function
this is a lightweight combineReducers function for reducers. works with either redux
or useReducer
.
installation
yarn
yarn add @abdulghani/combinereducer
npm
npm install @abdulghani/combinereducer
usage
import combineReducer from "@abdulghani/combinereducer";
import { reducerOne, reducerTwo } from "somewhere";
const combinedReducers = combineReducer({
page: reducerOne,
data: reducerTwo
});
const MyApp = () => {
const [state, dispatch] = useReducer(combinedReducers);
// render
};
更多
你可能也喜欢
- @0x/sra-spec 中文文档教程
- @0xc/msteams-samesite-compatibility-validator 中文文档教程
- @10play/phoenix-table 中文文档教程
- @42.nl/ui-core-content-state 中文文档教程
- @4geit/rct-account-component 中文文档教程
- @4lch4/cronicle-plugin-tools 中文文档教程
- @_themis/usescheme 中文文档教程
- @a-la/detect-jsx 中文文档教程
- @aarhus-university/au-designsystem-delphinus 中文文档教程
- @ab.progr/eslint-config-node-extended 中文文档教程