File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import identity from 'lodash/utility/identity';
22import  shallowEqual  from  '../utils/shallowEqual' ; 
33
44export  default  function  createConnector ( React )  { 
5- 
65  const  {  Component,  PropTypes }  =  React ; 
76
87  return  class  Connector  extends  Component  { 
@@ -38,8 +37,7 @@ export default function createConnector(React) {
3837    constructor ( props ,  context )  { 
3938      super ( props ,  context ) ; 
4039
41-       this . handleChange  =  this . handleChange . bind ( this ) ; 
42-       this . unsubscribe  =  context . redux . subscribe ( this . handleChange ) ; 
40+       this . unsubscribe  =  context . redux . subscribe ( ::this . handleChange ) ; 
4341      this . state  =  this . selectState ( {  context,  props } ) ; 
4442    } 
4543
@@ -67,12 +65,9 @@ export default function createConnector(React) {
6765    render ( )  { 
6866      const  {  children }  =  this . props ; 
6967      const  {  slice }  =  this . state ; 
70-       const  {  redux }  =  this . context ; 
68+       const  {  redux :  {  dispatch  }  }  =  this . context ; 
7169
72-       return  children ( { 
73-         dispatch : redux . dispatch , 
74-         ...slice 
75-       } ) ; 
70+       return  children ( {  dispatch,  ...slice  } ) ; 
7671    } 
7772  } ; 
7873} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments