From 00ad5c01d4aa09c77c712f17161506f863c211a6 Mon Sep 17 00:00:00 2001 From: Christoph Tavan Date: Thu, 10 Sep 2020 09:51:25 +0200 Subject: [PATCH] Document Expo SDK v39 behavior Fixes #207 --- README.md | 5 +++-- package.json | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) 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": {