Add setup steps to React native
This commit is contained in:
parent
89ae529dd1
commit
853da85d41
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue