Skip to content

Commit 2401006

Browse files
authored
docs(README): add note about downside [ci skip]
1 parent aff0f05 commit 2401006

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Imagine you're combining 100 subreducers, and you're dispatching actions from a
1212

1313
This package and [`mindfront-redux-utils-immutable`](https://github.com/jcoreio/redux-utils-immutable) help you create and combine reducers and middleware in such a way that only the relevant subreducer(s) and middleware for a given action are called, so you don't have to worry that performance will decrease with every subreducer or sub-subreducer (etc) you add.
1414

15+
There is a downside to this approach: debugging is more difficult, because it's harder to trace where a subreducer is getting called from (or why it's not getting called). This package tries to mitigate that problem as much as it can by saving stack traces of where reducers were created and combined.
16+
1517
## createReducer([initialState: any,] actionHandlers: {[actionType: string]: Reducer}): Reducer
1618
```js
1719
import {createReducer} from 'mindfront-redux-utils';

0 commit comments

Comments
 (0)