How to use the feature-toggle-jsx.withoutFeature function in feature-toggle-jsx

To help you get started, we’ve selected a few feature-toggle-jsx 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 matmalkowski / react-handyman / packages / sandbox / src / featureToggleExamples / withoutFeature / DisabledComponent.tsx View on Github external
import * as React from 'react'
import { withoutFeature } from 'feature-toggle-jsx'
import { Features } from '../types'

const MyOtherFeatureComponent: React.FC<{}> = () => (
  <>
    <p>
      <strong>My Special Component</strong>
      <br>
      <span>You should see this when it's disabled !?</span>
    </p>
  
)

const WrappedComponent = withoutFeature(MyOtherFeatureComponent, 'myOtherFeature')

export { WrappedComponent }

export default MyOtherFeatureComponent

feature-toggle-jsx

Toggle component on/off based on feature configuration

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis