How to use the @flopflip/react.isFeatureEnabled 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 / feature-toggled / feature-toggled.js View on Github external
withProps(props => ({
    isFeatureEnabled: isFeatureEnabled(props.flag, props.variate)(
      props[ALL_FLAGS_PROP_KEY]
    ),
  }))
)(FeatureToggled);
github tdeekens / flopflip / packages / react-redux / modules / components / feature-toggled / feature-toggled.js View on Github external
export const mapStateToProps = (state, ownProps) => ({
  isFeatureEnabled: isFeatureEnabled(ownProps.flag, ownProps.variate)(
    state[STATE_SLICE].flags
  ),
});