Guest User

Untitled

a guest
Mar 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. // @flow
  2. import { type HOC } from 'recompose'
  3. import { connect } from 'react-redux'
  4. import type { Dispatch, State } from '../types'
  5.  
  6. type F<M> = (state: State) => M
  7. type CHOC<E: {}, M> = HOC<{ ...$Exact<E>, dispatch: Dispatch, ...M }, E>
  8.  
  9. export default function connectStore<Enhanced: {}, M: *>(
  10. mapper: F<M>
  11. ): CHOC<Enhanced, M> {
  12. return (connect(mapper): Function)
  13. }
Add Comment
Please, Sign In to add comment