Skip to content

abdulghani/combinereducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

combinereducer function for reducer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published