@@ -32,12 +32,12 @@ ReactDOM.render(
3232);
3333```
3434
35- Prop | Type | Required | Description
36- --- | --- | --- | ---
37- user | Object | true | User information
38- clientkey | String | true | Your LaunchDarkly secret key
39- onFlagsChange | function | false | Handler for flag change
40- loadingComponent | Component | false | Loading component / string
35+ | Prop | Type | Required | Description |
36+ | ------------------ | ----------- | ---------- | ------------------------------ |
37+ | user | Object | true | User information |
38+ | clientkey | String | true | Your LaunchDarkly secret key |
39+ | onFlagsChange | function | false | Handler for flag change |
40+ | loadingComponent | Component | false | Loading component / string |
4141
4242### Flags
4343All ` Flags ` components get the _ ldClient_ instance thanks to the ` FlagsProvider ` component.
@@ -53,13 +53,12 @@ You have the control on what will be rendered:
5353* If the flag isn't active, nothing will be rendered unless you pass a component as fallback by the ` fallbackRender ` props.
5454
5555
56- Prop | Type | Required | Description
57- --- | --- | --- | ---
58- flag | String | true | The flag to check
59- children | Element/Component | false | Return the component if the flag given by props is active
60- renderOn | Function | false | Return the given component if the flag is active
61- fallbackRender | Function | false | Return the given component if the flag is inactive
62-
56+ | Prop | Type | Required | Description |
57+ | ----------------| -------------------| ----------| -----------------------------------------------------------|
58+ | flag | String | true | The flag to check |
59+ | children | Element/Component | false | Return the component if the flag given by props is active |
60+ | renderOn | Function | false | Return the given component if the flag is active |
61+ | fallbackRender | Function | false | Return the given component if the flag is inactive |
6362
6463#### with children props
6564
@@ -127,11 +126,11 @@ Same as `Flags` components but in a Higher Order Component way.
127126` WithFlags([flag])([ComponentToRenderIfTrue][ComponentToRenderIfFalse]) `
128127
129128
130- Arguments | Type | Required | Description
131- --- | --- | --- | ---
132- flag | String | true | The flag to check
133- ComponentToRenderIfTrue | React Component | true | The React component to render if the flag is true or is a multivariant flag
134- ComponentToRenderIfFalse | React Component | false | The React component to render if the flag is false
129+ | Arguments | Type | Required | Description |
130+ | -------------------------- | ----------------- | ---------- | ----------------------------------------------------------------------------- |
131+ | flag | String | true | The flag to check |
132+ | ComponentToRenderIfTrue | React Component | true | The React component to render if the flag is true or is a multivariant flag |
133+ | ComponentToRenderIfFalse | React Component | false | The React component to render if the flag is false |
135134
136135#### Component render based on flag value
137136
0 commit comments