Skip to content

Commit dad10df

Browse files
authored
docs: startTransition in React Native (#181)
1 parent 1dd2c69 commit dad10df

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ Wrap your components like so:
265265

266266
## React Native
267267

268+
### localStorage
269+
268270
IMPORTANT: This no longer comes included in the unleash-proxy-client-js library. You will need to install the storage adapter for your preferred storage solution.
269271

270272
Because React Native doesn't run in a web browser, it doesn't have access to the `localStorage` API. Instead, you need to tell Unleash to use your specific storage provider. The most common storage provider for React Native is [AsyncStorage](https://github.com/react-native-async-storage/async-storage).
@@ -282,6 +284,13 @@ const config = {
282284
};
283285
```
284286

287+
### startTransition
288+
289+
If your version of React Native doesn't support `startTransition`, you can provide fallback implementation:
290+
```jsx
291+
<FlagProvider startTransition={fn => fn()} ></FlagProvider>
292+
```
293+
285294
# Migration guide
286295

287296
## Upgrade path from v1 -> v2

0 commit comments

Comments
 (0)