Skip to content

Instantly share code, notes, and snippets.

@craftzdog
Last active March 10, 2018 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craftzdog/21681b2d5e4089ad04a477531556a860 to your computer and use it in GitHub Desktop.
Save craftzdog/21681b2d5e4089ad04a477531556a860 to your computer and use it in GitHub Desktop.
// @flow
import { type HOC } from 'recompose'
import { connect } from 'react-redux'
import type { Dispatch } from '../types'
type CHOC<E: {}> = HOC<{ ...$Exact<E>, dispatch: Dispatch }, E>
export default function getDispatch<Enhanced: {}>(): CHOC<Enhanced> {
return (connect(): Function)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment