@abdulghani/logreducer 中文文档教程
logReducer function for reducer
这是减速器的一个简单功能。 它是一个纯函数,不是 React 组件或 React Hook(这对 React 并发模式有利/不利)。 适用于 redux
和 useReducer
。
Installation
纱线
yarn add @abdulghani/logreducer
npm
npm install @abdulghani/logreducer
Usage
import logReducer from "@abdulghani/logreducer";
import reducer from "somewhere";
// setup your reducer
const loggedReducer = logReducer(reducer);
const MyApp = () => {
const [state, dispatch] = useReducer(loggedReducer);
// render function
};
logReducer function for reducer
this is a simple function for reducer. it's a pure function, not a react component or react hook (which is good/not for react concurrent mode). works for redux
and useReducer
.
Installation
yarn
yarn add @abdulghani/logreducer
npm
npm install @abdulghani/logreducer
Usage
import logReducer from "@abdulghani/logreducer";
import reducer from "somewhere";
// setup your reducer
const loggedReducer = logReducer(reducer);
const MyApp = () => {
const [state, dispatch] = useReducer(loggedReducer);
// render function
};
更多
你可能也喜欢
- 6s 中文文档教程
- @12stonechurch/react-native-audio-toolkit 中文文档教程
- @4geit/rct-reorderable-grid-list-component 中文文档教程
- @a-a-game-studio/aa-image-manipolatore 中文文档教程
- @a-la/import 中文文档教程
- @a6kme/create-npm-package 中文文档教程
- @aacassandra/wvue-cli 中文文档教程
- @aaron-s-kim/lotide 中文文档教程
- @abstracter/atomic-release 中文文档教程
- @acheronfail/templater.js 中文文档教程