@abdulghani/logreducer

1.0.16 • Public • Published

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
};

Package Sidebar

Install

npm i @abdulghani/logreducer

Weekly Downloads

9

Version

1.0.16

License

ISC

Unpacked Size

5.44 kB

Total Files

10

Last publish

Collaborators

  • abdulghani