Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import {connect} from 'react-redux';
  2.  
  3. function connector(mapStateToProps, mapDispatchToProps, composes, component) {
  4. const conn = connect(mapStateToProps, mapDispatchToProps);
  5.  
  6. let f = component;
  7. for (const compose of composes) {
  8. f = compose(f);
  9. }
  10.  
  11. return conn(f);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement