Skip to content

Commit

Permalink
docs: startTransition in React Native (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Nov 29, 2024
1 parent 1dd2c69 commit dad10df
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ Wrap your components like so:

## React Native

### localStorage

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.

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).
Expand All @@ -282,6 +284,13 @@ const config = {
};
```

### startTransition

If your version of React Native doesn't support `startTransition`, you can provide fallback implementation:
```jsx
<FlagProvider startTransition={fn => fn()} ></FlagProvider>
```

# Migration guide

## Upgrade path from v1 -> v2
Expand Down

0 comments on commit dad10df

Please sign in to comment.