File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/components/CounterButton Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 96
96
"less-loader" : " ^2.2.1" ,
97
97
"lru-memoize" : " ^1.0.0" ,
98
98
"map-props" : " ^1.0.0" ,
99
- "multireducer" : " ^1 .0.2 " ,
99
+ "multireducer" : " ^2 .0.0 " ,
100
100
"piping" : " ^0.3.0" ,
101
101
"pretty-error" : " ^1.2.0" ,
102
102
"query-string" : " ^3.0.0" ,
Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ import {connectMultireducer} from 'multireducer';
3
3
import { increment } from 'redux/modules/counter' ;
4
4
5
5
@connectMultireducer (
6
- state => ( { count : state . count } ) ,
7
- { increment} )
6
+ ( key , state ) => {
7
+ return ( { count : state . multireducer [ key ] . count } ) ;
8
+ } ,
9
+ { increment}
10
+ )
8
11
export default class CounterButton extends Component {
9
12
static propTypes = {
10
13
count : PropTypes . number ,
You can’t perform that action at this time.
0 commit comments