File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 1
- import { Component , PropTypes } from 'react' ;
1
+ import { PropTypes } from 'react' ;
2
2
3
3
function dispatch ( store , atom , action ) {
4
4
return store ( atom , action ) ;
5
5
}
6
6
7
- export default class Dispatcher extends Component {
7
+ export default class Dispatcher {
8
8
static propTypes = {
9
9
store : PropTypes . func . isRequired ,
10
10
children : PropTypes . func . isRequired
@@ -18,9 +18,7 @@ export default class Dispatcher extends Component {
18
18
return { redux : this } ;
19
19
}
20
20
21
- constructor ( props , context ) {
22
- super ( props , context ) ;
23
-
21
+ constructor ( props ) {
24
22
this . subscriptions = [ ] ;
25
23
this . emitChange = this . emitChange . bind ( this ) ;
26
24
this . dispatch = this . dispatch . bind ( this ) ;
@@ -36,11 +34,6 @@ export default class Dispatcher extends Component {
36
34
37
35
setAtom ( atom ) {
38
36
this . atom = atom ;
39
- if ( this . state ) {
40
- this . setState ( { atom } ) ;
41
- } else {
42
- this . state = { atom } ;
43
- }
44
37
this . emitChange ( ) ;
45
38
}
46
39
You can’t perform that action at this time.
0 commit comments