markerikson/redux-ecosystem-links

Reducer as map of functions

NookieGrey opened this issue · 4 comments

I find createReducer function in documentation https://redux.js.org/recipes/reducing-boilerplate#reducers

export function createReducer(initialState, handlers) {
  return (state = initialState, action) => {
    if (handlers.hasOwnProperty(action.type)) {
      return handlers[action.type](state, action);
    }
    return state;
  };
}

Is it any package in npm where i can refer in my app or I need to add this function in all projects and add link to this documentation?

This list is very big, can it be sorted by starts?

@NugzarGaguliya : not this list in its current form, no, because it's all just Markdown text files.

However, there's an app being built that will parse this list and present it in a sortable form, at https://github.com/wilbertliu/redux-ecosystem . It's not done yet, but I think it's getting close.