diff --git a/packages/react-native-sdk/README.md b/packages/react-native-sdk/README.md index f04ade6d..212e77db 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). ## Get started @@ -46,6 +46,13 @@ function StartHuddleButton() { } ``` +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. + ## Reference The React Native SDK shares its API with the React SDK. Use the React SDK reference for full types and details: @@ -56,8 +63,8 @@ The React Native SDK shares its API with the React SDK. Use the React SDK refere ### 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"; @@ -94,3 +101,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).