Skip to content

Instantly share code, notes, and snippets.

@masahitojp
Created June 12, 2019 00:34
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 masahitojp/a61c2e906d13d8432fe0bc0fc26d329c to your computer and use it in GitHub Desktop.
Save masahitojp/a61c2e906d13d8432fe0bc0fc26d329c to your computer and use it in GitHub Desktop.
it's a example for RenderProps to HoC for react-mixpanel v1.0
// @flow
import { MixpanelConsumer } from 'react-mixpanel'
import { fromRenderProps } from 'recompose'
const enhancer = fromRenderProps(MixpanelConsumer, (mixpanel) => ({
mixpanel,
}))
export default enhancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment