Created
June 12, 2019 00:34
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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