diff --git a/.docs/content/2.essentials/0.usage-on-x.md b/.docs/content/2.essentials/0.usage-on-x.md index 0c7443d..da53dc1 100644 --- a/.docs/content/2.essentials/0.usage-on-x.md +++ b/.docs/content/2.essentials/0.usage-on-x.md @@ -39,6 +39,23 @@ const providers = makeProviders({ ``` ## React native +To use the library in a react native app, you would also need a couple of polyfills to polyfill crypto and base64. + +1. First install the polyfills: +```bash +npm install @react-native-anywhere/polyfill-base64 react-native-quick-crypto +``` + +2. Add the polyfills to your app: +```ts +// Import in your entry file +import '@react-native-anywhere/polyfill-base64'; +``` + +And follow the [react-native-quick-crypto documentation](https://github.com/margelo/react-native-quick-crypto) to set up the crypto polyfill. + +3. Then you can use the library like this: + ```ts import { makeProviders, makeStandardFetcher, targets } from '@movie-web/providers';