From 701790878ad06ee6d542a4dff339ad8292bec585 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:21:30 +0100 Subject: [PATCH 1/8] ci: force npm oidc config --- .github/workflows/publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 098b9a5e..62d49cb9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,9 +35,14 @@ jobs: run: yarn install --immutable - name: Build packages run: yarn build + - name: Prepare npmrc for OIDC + run: | + echo "@reflag:registry=https://registry.npmjs.org/" > "${RUNNER_TEMP}/.npmrc" - name: Publish run: yarn lerna publish from-package --no-private --yes env: + NPM_CONFIG_USERCONFIG: "${{ runner.temp }}/.npmrc" + NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From a0188527f6778174d23a4ca72784d7d6dbfaaf7d Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:22:40 +0100 Subject: [PATCH 2/8] Revert "ci: force npm oidc config" This reverts commit 701790878ad06ee6d542a4dff339ad8292bec585. --- .github/workflows/publish.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 62d49cb9..098b9a5e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,14 +35,9 @@ jobs: run: yarn install --immutable - name: Build packages run: yarn build - - name: Prepare npmrc for OIDC - run: | - echo "@reflag:registry=https://registry.npmjs.org/" > "${RUNNER_TEMP}/.npmrc" - name: Publish run: yarn lerna publish from-package --no-private --yes env: - NPM_CONFIG_USERCONFIG: "${{ runner.temp }}/.npmrc" - NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From 1bdd5d5a5bbc5227e789274569fbeaa9261efa8a Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:22:52 +0100 Subject: [PATCH 3/8] ci: clear NODE_AUTH_TOKEN for npm publish --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 098b9a5e..2db6b40b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,6 +38,7 @@ jobs: - name: Publish run: yarn lerna publish from-package --no-private --yes env: + NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From c8602f72011940f5429ace9f6e0360dbf8f16e0b Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Fri, 6 Feb 2026 13:22:45 +0100 Subject: [PATCH 4/8] Document React Native SDK --- README.md | 6 ++++++ packages/react-native-sdk/typedoc.json | 4 ++++ typedoc.json | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 packages/react-native-sdk/typedoc.json diff --git a/README.md b/README.md index d6485d56..eafffc37 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ Client side React SDK [Read the docs](packages/react-sdk/README.md) +## React Native SDK + +React Native SDK for mobile apps + +[Read the docs](packages/react-native-sdk/README.md) + ## Vue SDK (beta) Client side Vue SDK diff --git a/packages/react-native-sdk/typedoc.json b/packages/react-native-sdk/typedoc.json new file mode 100644 index 00000000..1643507a --- /dev/null +++ b/packages/react-native-sdk/typedoc.json @@ -0,0 +1,4 @@ +{ + "tsconfig": "tsconfig.build.json", + "entryPoints": ["src/index.tsx"] +} diff --git a/typedoc.json b/typedoc.json index e7515346..37642dde 100644 --- a/typedoc.json +++ b/typedoc.json @@ -12,6 +12,7 @@ "packages/browser-sdk/", "packages/node-sdk/", "packages/react-sdk/", + "packages/react-native-sdk/", "packages/vue-sdk/" ], "packageOptions": { @@ -19,7 +20,9 @@ }, "projectDocuments": [ "packages/browser-sdk/FEEDBACK.md", - "packages/cli/README.md" + "packages/cli/README.md", + "packages/react-sdk/README.md", + "packages/react-native-sdk/README.md" ], "readme": "none", "useHTMLAnchors": false, From 02ba73f0309adf52612e37dbcead177528a3ab14 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Fri, 6 Feb 2026 13:23:31 +0100 Subject: [PATCH 5/8] Mark React Native SDK as beta --- README.md | 2 +- packages/react-native-sdk/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eafffc37..4f5f2c13 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Client side React SDK [Read the docs](packages/react-sdk/README.md) -## React Native SDK +## React Native SDK (beta) React Native SDK for mobile apps diff --git a/packages/react-native-sdk/README.md b/packages/react-native-sdk/README.md index 53e39da9..d260fdb2 100644 --- a/packages/react-native-sdk/README.md +++ b/packages/react-native-sdk/README.md @@ -1,4 +1,4 @@ -# Reflag React Native SDK +# Reflag React Native SDK (beta) A thin React Native wrapper around `@reflag/react-sdk`. From 88ca7336aea5ec911a0d39303ae41970c869ed86 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Fri, 6 Feb 2026 13:26:03 +0100 Subject: [PATCH 6/8] Revert "ci: clear NODE_AUTH_TOKEN for npm publish" This reverts commit 1bdd5d5a5bbc5227e789274569fbeaa9261efa8a. --- .github/workflows/publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2db6b40b..098b9a5e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,7 +38,6 @@ jobs: - name: Publish run: yarn lerna publish from-package --no-private --yes env: - NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From 4e67a420a9667b550d10212d88252f9b644e11c3 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Fri, 6 Feb 2026 14:31:07 +0100 Subject: [PATCH 7/8] Tidy React Native SDK get started --- packages/react-native-sdk/README.md | 36 +++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/packages/react-native-sdk/README.md b/packages/react-native-sdk/README.md index d260fdb2..30722930 100644 --- a/packages/react-native-sdk/README.md +++ b/packages/react-native-sdk/README.md @@ -6,29 +6,51 @@ For more usage details, see the React SDK README in `packages/react-sdk/README.m An Expo example app lives at `packages/react-native-sdk/dev/expo`. -## Install +## Get started + +### Install ```shell npm i @reflag/react-native-sdk ``` -## Usage +### 1. Add the ReflagProvider + +Wrap your app with the provider from `@reflag/react-native-sdk`: ```tsx -import { ReflagProvider, useFlag } from "@reflag/react-native-sdk"; +import { ReflagProvider } from "@reflag/react-native-sdk"; - + {/* children here are shown when loading finishes */} ; ``` -See the React SDK README in `packages/react-sdk/README.md` for more details. +### 2. Use `useFlag()` + +```tsx +import { useFlag } from "@reflag/react-native-sdk"; + +function StartHuddleButton() { + const { isEnabled, track } = useFlag("huddle"); + + if (!isEnabled) return null; + + return