Skip to content

Instantly share code, notes, and snippets.

@lukyth
Created August 24, 2018 05:40
Show Gist options
  • Save lukyth/3224f42e8a4252cf35b3474dd47aecad to your computer and use it in GitHub Desktop.
Save lukyth/3224f42e8a4252cf35b3474dd47aecad to your computer and use it in GitHub Desktop.
import { compose, mapProps } from 'recompose'
import { withSelectors } from '../tw-app-core'
import Features from './Features'
import { selectFeatures } from './selectors'
export default (
mapToProps: (features: Features) => { [key: string]: boolean }
) =>
compose(
withSelectors(() => ({
features: selectFeatures,
})),
mapProps<{}, { features: Features }>(({ features, ...props }) => ({
...props,
...mapToProps(features),
}))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment