Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @flow
- import { type HOC } from 'recompose'
- import { connect } from 'react-redux'
- import type { Dispatch, State } from '../types'
- type F<M> = (state: State) => M
- type CHOC<E: {}, M> = HOC<{ ...$Exact<E>, dispatch: Dispatch, ...M }, E>
- export default function connectStore<Enhanced: {}, M: *>(
- mapper: F<M>
- ): CHOC<Enhanced, M> {
- return (connect(mapper): Function)
- }
Add Comment
Please, Sign In to add comment