You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-native-sdk/README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
A thin React Native wrapper around `@reflag/react-sdk`.
4
4
5
-
For more usage details, see the React SDK README in `packages/react-sdk/README.md`.
5
+
For more usage details, see the [React SDK README](../react-sdk/README.md).
6
6
7
-
An Expo example app lives at `packages/react-native-sdk/dev/expo`.
7
+
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).
See the React SDK README in `packages/react-sdk/README.md` for more details.
31
+
See the [React SDK README](../react-sdk/README.md) for more details.
32
+
33
+
## React Native differences
34
+
35
+
- The Reflag toolbar is web-only and is not available in React Native.
36
+
- 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.
32
37
33
38
## Cookbook
34
39
35
40
### Refresh flags when the app returns to the foreground
36
41
37
-
Flags are updated if the context passed to <ReflagProvider> changes, but you might also want to update them in when the app comes to the foreground.
38
-
See this snipped on how to achieve that:
42
+
Flags are updated if the context passed to `<ReflagProvider>` changes, but you might also want to update them when the app comes to the foreground.
43
+
See this snippet:
39
44
40
45
```tsx
41
46
importReact, { useEffect, useRef } from"react";
@@ -72,3 +77,8 @@ export function App() {
72
77
);
73
78
}
74
79
```
80
+
81
+
## Bootstrapping
82
+
83
+
You can use `<ReflagBootstrappedProvider>` in React Native when you already have pre-fetched flags and want to avoid an initial fetch.
84
+
For bootstrap usage patterns and options, see the [React SDK bootstrapping docs](../react-sdk/README.md#server-side-rendering-and-bootstrapping).
0 commit comments