@leancodepl/feature-flags-react-client 10.0.2 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +19 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.1.1](https://github.com/leancodepl/js_corelibrary/compare/v10.1.0...v10.1.1) (2026-02-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @leancodepl/feature-flags-react-client
|
|
9
|
+
|
|
10
|
+
# Change Log
|
|
11
|
+
|
|
12
|
+
All notable changes to this project will be documented in this file. See
|
|
13
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
14
|
+
|
|
15
|
+
# [10.1.0](https://github.com/leancodepl/js_corelibrary/compare/v10.0.2...v10.1.0) (2026-02-16)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @leancodepl/feature-flags-react-client
|
|
18
|
+
|
|
19
|
+
# Change Log
|
|
20
|
+
|
|
21
|
+
All notable changes to this project will be documented in this file. See
|
|
22
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
23
|
+
|
|
6
24
|
## [10.0.2](https://github.com/leancodepl/js_corelibrary/compare/v10.0.1...v10.0.2) (2026-02-13)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @leancodepl/feature-flags-react-client
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Creates React hooks for type-safe feature flag management using OpenFeature.
|
|
|
25
25
|
|
|
26
26
|
## Usage Examples
|
|
27
27
|
|
|
28
|
-
### Basic Setup
|
|
28
|
+
### Basic Setup (ConfigCat)
|
|
29
29
|
|
|
30
30
|
```typescript
|
|
31
31
|
//featureFlags.ts
|
|
@@ -41,6 +41,24 @@ const provider = ConfigCatWebProvider.create("sdk-key")
|
|
|
41
41
|
export const { FeatureFlagsProvider, useFeatureFlag } = mkFeatureFlags(flags, provider)
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
### Basic Setup (PostHog)
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
//featureFlags.ts
|
|
48
|
+
import { mkFeatureFlags } from "@leancodepl/feature-flags-react-client"
|
|
49
|
+
import { OpenFeaturePosthogProvider } from "@leancodepl/openfeature-posthog-provider"
|
|
50
|
+
import posthog from "posthog-js"
|
|
51
|
+
|
|
52
|
+
const flags = {
|
|
53
|
+
enableNewFeature: { defaultValue: false },
|
|
54
|
+
maxRetries: { defaultValue: 3 },
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
posthog.init("YOUR_API_KEY")
|
|
58
|
+
const provider = new OpenFeaturePosthogProvider(posthog)
|
|
59
|
+
export const { FeatureFlagsProvider, useFeatureFlag } = mkFeatureFlags(flags, provider)
|
|
60
|
+
```
|
|
61
|
+
|
|
44
62
|
### Component Usage
|
|
45
63
|
|
|
46
64
|
```typescript
|