reduce-reducers

WebJar for reduce-reducers

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

reduce-reducers
Последняя версия

Последняя версия

0.4.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

reduce-reducers
WebJar for reduce-reducers
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/redux-utilities/reduce-reducers

Скачать reduce-reducers

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/reduce-reducers/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>reduce-reducers</artifactId>
    <version>0.4.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/reduce-reducers/
implementation 'org.webjars.npm:reduce-reducers:0.4.3'
// https://jarcasting.com/artifacts/org.webjars.npm/reduce-reducers/
implementation ("org.webjars.npm:reduce-reducers:0.4.3")
'org.webjars.npm:reduce-reducers:jar:0.4.3'
<dependency org="org.webjars.npm" name="reduce-reducers" rev="0.4.3">
  <artifact name="reduce-reducers" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='reduce-reducers', version='0.4.3')
)
libraryDependencies += "org.webjars.npm" % "reduce-reducers" % "0.4.3"
[org.webjars.npm/reduce-reducers "0.4.3"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Looking for Maintainers

Unfortunately I (timche) don't have the required time anymore to maintain this library and give it the necessary attention. Therefore I'm looking for maintainers that are willing to take care of this library on a long-term basis.

Requirements:

  • Having knowledge of this library and open-source in general.
  • Keeping the philosophy and goals of this library.
  • Taking care of issues and pull requests.
  • If required and reasonable, working out next versions of this library with the intention to improve it with the community in mind and not for the sole purpose.
  • Knowing what's good for the library and what not (e.g. not accepting every suggestion) in order to maintain the library scope.
  • Having knowledge about the tooling (CI, build system, etc.) and the docs and maintaining them.

It's also possible to join redux-utilities, an umbrella organization of complementing redux utility libraries like this one, to take care of few or all libraries. Please let me know if you are interested in that.

Please send me an email (adress on my profile) with the subject "reduce-reducers" and some information about you, if you want to be a maintainer.

reduce-reducers

Build Status npm Version npm Downloads Monthly

Reduce multiple reducers into a single reducer from left to right

Install

npm install reduce-reducers

Usage

import reduceReducers from 'reduce-reducers';

const initialState = { A: 0, B: 0 };

const addReducer = (state, payload) => ({ ...state, A: state.A + payload });
const multReducer = (state, payload) => ({ ...state, B: state.B * payload });

const reducer = reduceReducers(initialState, addReducer, multReducer);

const state = { A: 1, B: 2 };
const payload = 3;

reducer(state, payload); // { A: 4, B: 6 }

FAQ

Why?

Originally created to combine multiple Redux reducers that correspond to different actions (e.g. like this). Technically works with any reducer, not just with Redux, though I don't know of any other use cases.

What is the difference between reduceReducers and combineReducers?

This StackOverflow post explains it very well: https://stackoverflow.com/a/44371190/5741172

org.webjars.npm

Redux Utilities

Useful utilities to build Redux applications

Версии библиотеки

Версия
0.4.3