Skip to content

Commit

Permalink
add information for react-native support
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Aug 13, 2024
1 parent bcc40c5 commit 759cbd3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1390,10 +1390,27 @@ export const testMyFirstTest = tc => {

### React-Native support

React-native apps should be able to use lib0. You need to install a polyfill for
webcrypto and enable package-exports support in react-native:

```sh
# install polyfill
npm i isomorphic-webcrypto
```

Add this to `metro.config.js` [(see docs)](https://reactnative.dev/blog/2023/06/21/package-exports-support):

```js
const config = {
// ...
resolver: {
unstable_enablePackageExports: true
}
}
```



### License

[The MIT License](./LICENSE) © Kevin Jahns

0 comments on commit 759cbd3

Please sign in to comment.