How to use the @flopflip/react.injectFeatureToggles function in @flopflip/react

To help you get started, we’ve selected a few @flopflip/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tdeekens / flopflip / packages / react-broadcast / modules / components / inject-feature-toggles / inject-feature-toggles.ts View on Github external
) => (
  Component: React.ComponentType
): React.ComponentType =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'injectFeatureToggles')),
    withFlags(),
    // @ts-ignore
    injectFeatureToggles(flagNames, propKey, areOwnPropsEqual)
  )(Component);
github tdeekens / flopflip / packages / react-redux / modules / components / inject-feature-toggles / inject-feature-toggles.ts View on Github external
) => (
  Component: React.ComponentType
): React.ComponentType =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'injectFeatureToggles')),
    // @ts-ignore
    connect(mapStateToProps),
    injectFeatureToggles(flagNames, propKey, areOwnPropsEqual)
  )(Component);