0.2.2 • Published 9 months ago

@xtreamsrl/react-feature-flags-dummy v0.2.2

Weekly downloads
-
License
-
Repository
github
Last release
9 months ago

@xtreamsrl/react-feature-flags-dummy

This package exposes an example implementation of the feature flag manager.

Installation

npm install @xtreamsrl/react-feature-flags-dummy

Usage

Set up the feature flag tool to use with configureManager by passing it an instance of the DummyFeatureFlagsManager manager and wrap the main app with the DummyFeatureFlagsProvider.

// app.tsx
import { configureManager } from '@xtreamsrl/react-feature-flags';
import { GrowthbookProvider, DummyFeatureFlagsManager } from '@xtreamsrl/react-feature-flags-dummy';
import { flagMap } from '.shared/feature-flags'

const dummyManager = new DummyFeatureFlagsManager(flagMap);

configureManager({
    manager: dummyManager
})

export function App() {
  return (
    <DummyFeatureFlagsProvider value={dummyManager}>
      <MainApp />
    </DummyFeatureFlagsProvider>
  );
}

For more details on how to manage flags read the react-feature-flags README.

Who we are

0.2.2

9 months ago

0.2.1

1 year ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago