From 701790878ad06ee6d542a4dff339ad8292bec585 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:21:30 +0100 Subject: [PATCH 1/4] 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/4] 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/4] 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 cd5bdf90605edbbf6a698497c781cc8e4c420900 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Mon, 9 Feb 2026 22:42:21 +0100 Subject: [PATCH 4/4] Update React Native README links --- packages/react-native-sdk/README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/react-native-sdk/README.md b/packages/react-native-sdk/README.md index 53e39da9..f9113037 100644 --- a/packages/react-native-sdk/README.md +++ b/packages/react-native-sdk/README.md @@ -2,9 +2,9 @@ A thin React Native wrapper around `@reflag/react-sdk`. -For more usage details, see the React SDK README in `packages/react-sdk/README.md`. +For more usage details, see the [React SDK README](../react-sdk/README.md). -An Expo example app lives at `packages/react-native-sdk/dev/expo`. +An Expo example app lives in [packages/react-native-sdk/dev/expo](https://github.com/reflagcom/javascript/tree/main/packages/react-native-sdk/dev/expo). ## Install @@ -28,14 +28,19 @@ import { ReflagProvider, useFlag } from "@reflag/react-native-sdk"; ; ``` -See the React SDK README in `packages/react-sdk/README.md` for more details. +See the [React SDK README](../react-sdk/README.md) for more details. + +## React Native differences + +- The Reflag toolbar is web-only and is not available in React Native. +- Built-in feedback UI is web-only. In React Native, use your own UI and call `useSendFeedback` or `client.feedback` when you're ready to send feedback. ## Cookbook ### Refresh flags when the app returns to the foreground -Flags are updated if the context passed to changes, but you might also want to update them in when the app comes to the foreground. -See this snipped on how to achieve that: +Flags are updated if the context passed to `` changes, but you might also want to update them when the app comes to the foreground. +See this snippet: ```tsx import React, { useEffect, useRef } from "react"; @@ -72,3 +77,8 @@ export function App() { ); } ``` + +## Bootstrapping + +You can use `` in React Native when you already have pre-fetched flags and want to avoid an initial fetch. +For bootstrap usage patterns and options, see the [React SDK bootstrapping docs](../react-sdk/README.md#server-side-rendering-and-bootstrapping).