How to use @flopflip/react - 10 common examples

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 / branch-on-feature-toggle / branch-on-feature-toggle.ts View on Github external
) => (
  ToggledComponent: React.ComponentType
): React.ComponentType =>
  // @ts-ignore
  flowRight(
    setDisplayName(wrapDisplayName(ToggledComponent, 'branchOnFeatureToggle')),
    injectFeatureToggle(flag),
    branchOnFeatureToggle(
      UntoggledComponent,
      DEFAULT_FLAG_PROP_KEY,
      variation
    )
  )(ToggledComponent);
github tdeekens / flopflip / packages / react-broadcast / modules / components / inject-feature-toggle / inject-feature-toggle.ts View on Github external
export default (flagName: FlagName, propKey?: string) => (
  Component: React.ComponentType
): React.ComponentType =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
    withFlags(),
    // @ts-ignore
    injectFeatureToggle(flagName, propKey)
  )(Component);
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-toggle / inject-feature-toggle.ts View on Github external
export default (flagName: FlagName, propKey?: string) => (
  Component: React.ComponentType
): React.ComponentType =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
    // @ts-ignore
    connect(mapStateToProps),
    injectFeatureToggle(flagName, propKey)
  )(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);
github tdeekens / flopflip / packages / react-broadcast / modules / components / branch-on-feature-toggle / branch-on-feature-toggle.ts View on Github external
) => (
  ToggledComponent: React.ComponentType
): React.ComponentType =>
  // @ts-ignore
  flowRight(
    setDisplayName(wrapDisplayName(ToggledComponent, 'branchOnFeatureToggle')),
    injectFeatureToggle(flag),
    branchOnFeatureToggle(
      UntoggledComponent,
      DEFAULT_FLAG_PROP_KEY,
      variation
    )
  )(ToggledComponent);
github tdeekens / flopflip / packages / react-broadcast / modules / components / inject-feature-toggle / inject-feature-toggle.ts View on Github external
export default (flagName: FlagName, propKey?: string) => (
  Component: React.ComponentType
): React.ComponentType =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
    withFlags(),
    // @ts-ignore
    injectFeatureToggle(flagName, propKey)
  )(Component);
github tdeekens / flopflip / packages / react-redux / modules / components / inject-feature-toggle / inject-feature-toggle.ts View on Github external
export default (flagName: FlagName, propKey?: string) => (
  Component: React.ComponentType
): React.ComponentType =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
    // @ts-ignore
    connect(mapStateToProps),
    injectFeatureToggle(flagName, propKey)
  )(Component);
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);