1.0.1 • Published 4 years ago

@abdulghani/combinereducers v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

combineReducers function

this is a lightweight combineReducers function for reducers.

usage

  import combineReducers from "@abdulghani/combinereducers";
  import { reducerOne, reducerTwo } from "somewhere";
  
  const combinedReducers = combineReducers({
    page: reducerOne,
    data: reducerTwo
  });

  const MyApp = () => {
    const [state, dispatch] = useReducer(combinedReducers);

    // render
  }