@abdulghani/combinereducer

1.0.7 • Public • Published

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

Package Sidebar

Install

npm i @abdulghani/combinereducer

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

2.5 kB

Total Files

8

Last publish

Collaborators

  • abdulghani