
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
combine-section-reducers
Advanced tools
One of the best ways to create a big reducer.
npm install --save combine-section-reducers
Section reducers is the same as reducers but it requires the third argument to get the entire state.
(sectionState, action, state) => newSectionState
It's called a section reducer.
But we had better write it as below not to be confused when we use combineReducers
and combineSectionReducers
together.
(state, action, entireState) => newState
The usage of combineSectionReducers
is the same as Redux's combineReducers's one.
But you can pass not only normal reducers but also section reducers to it.
Also, the result of combineSectionReducers
can be used as not only a normal reducer but also a section reducers.
import { combineReducers } from 'redux'
import combineSectionReducers from 'combine-section-reducers'
// Create a big reducer.
combineSectionReducers({
a: combineSectionReducers({
a: sectionReducerA,
b: sectionReducerB
}),
b: combineSectionReducers({
a: sectionReducerC,
b: reducerA
})
})
// Use combineReducers together.
combineReducers({
a: combineSectionReducers({
a: combineReducers({
a: sectionReducerA,
b: reducerA
},
b: combineSectionReducers({
a: sectionReducerB,
b: reducerB
},
}),
b: combineReducers({
a: combineReducers({
a: sectionReducerC,
b: reducerC
},
b: combineSectionReducers({
a: sectionReducerD,
b: reducerD
},
}),
})
MIT
FAQs
Combines section reducers
The npm package combine-section-reducers receives a total of 723 weekly downloads. As such, combine-section-reducers popularity was classified as not popular.
We found that combine-section-reducers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.