diff --git a/README.md b/README.md index e95bfa0a..55cd8136 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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`. diff --git a/package.json b/package.json index ed6bf3c6..d82d54e8 100644 --- a/package.json +++ b/package.json @@ -193,7 +193,9 @@ "Rollup", "transpile", "workaround", - "Deno" + "Deno", + "polyfill", + "v39" ] }, "sharec": {