How to use the @flopflip/react.branchOnFeatureToggle 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 / 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-redux / modules / components / branch-on-feature-toggle / branch-on-feature-toggle.js View on Github external
) => (WrappedComponent: ComponentType<$Diff>) =>
  flowRight(
    setDisplayName(wrapDisplayName(WrappedComponent, 'branchOnFeatureToggle')),
    injectFeatureToggle(flag),
    branchOnFeatureToggle(UntoggledComponent, DEFAULT_FLAG_PROP_KEY, variation)
  )(WrappedComponent);
github tdeekens / flopflip / packages / react-redux / modules / components / branch-on-feature-toggle / branch-on-feature-toggle.ts View on Github external
) => (Component: React.ComponentType) =>
  flowRight(
    setDisplayName(wrapDisplayName(Component, 'branchOnFeatureToggle')),
    injectFeatureToggle(flag),
    branchOnFeatureToggle(UntoggledComponent, DEFAULT_FLAG_PROP_KEY, variation)
  )(Component);
github tdeekens / flopflip / packages / react-broadcast / modules / components / branch-on-feature-toggle / branch-on-feature-toggle.js View on Github external
) => (WrappedComponent: ComponentType<$Diff>) =>
  flowRight(
    setDisplayName(wrapDisplayName(WrappedComponent, 'branchOnFeatureToggle')),
    injectFeatureToggle(flag),
    branchOnFeatureToggle(UntoggledComponent, DEFAULT_FLAG_PROP_KEY, variation)
  )(WrappedComponent);