Skip to content

Commit d05d374

Browse files
author
Daniel de la Cruz
committed
Update README.md
1 parent 9cea770 commit d05d374

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ A **_feature toggle_** system allows you to integrate features into your codebas
99
Feature toggles can allow software integration cycles that run in weeks, days, or even hours, as opposed to months or years. They are an essential component in a broader continuous integration system.
1010
([via](https://github.com/ericelliott/feature-toggle))
1111

12+
## Installation
13+
```
14+
$ npm install --save react-feature-toggle
15+
```
16+
1217
## How to use it
1318
First of all, create your component as if it were to receive by props an array with feature toggles:
1419

@@ -65,7 +70,7 @@ import { ToggleApp } from 'react-feature-toggle';
6570
const MyToggledApp = ToggleApp(MyApp, toggles);
6671
```
6772

68-
The way to provide the array of toggles is up to you, but keep in mind that the user of your app will need to provide the toggles somehow. In the following example, I'm providing a `Promise` function that returns an array of feature toggles on being fullfilled:
73+
The way to provide the array of toggles is up to you, but keep in mind that the user of your app will need to provide the toggles somehow. In the following example, I'm providing a `Promise` function that returns an array of feature toggles on being fullfilled. In production, it may be a good idea your togles from a configuration file, or a dedicated service. Also, keep in mind that you might implement some logic to decide which toggle are you activating to every of your users. The following is just for illustrative purpose only:
6974

7075
```javascript
7176
new Promise(resolve => {

0 commit comments

Comments
 (0)