Skip to content

Commit

Permalink
Document Expo SDK v39 behavior
Browse files Browse the repository at this point in the history
Fixes ai#207
  • Loading branch information
ctavan committed Sep 10, 2020
1 parent 2deb4b5 commit 00ad5c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -236,7 +236,8 @@ If you have an error above, here is temporary fix:

### React Native

React Native does not have built-in random generator.
React Native does not have built-in random generator. The following polyfill works for plain React
Native and Expo starting with v39.

1. Check [`react-native-get-random-values`] docs and install it.
2. Import it before Nano ID.
Expand All @@ -253,7 +254,7 @@ For Expo framework see the next section.

### Expo

If you use Expo in React Native, you need a different workaround.
If you use Expo prior to v39 in React Native, you need a different workaround.

1. Install [`expo-random`](https://www.npmjs.com/package/expo-random).
2. Use `nanoid/async` instead of `nanoid`.
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -193,7 +193,9 @@
"Rollup",
"transpile",
"workaround",
"Deno"
"Deno",
"polyfill",
"v39"
]
},
"sharec": {
Expand Down

0 comments on commit 00ad5c0

Please sign in to comment.