Skip to content

Commit

Permalink
docs: Ensure link to getrandomvalues-not-supported is maintained (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
dafrito authored Dec 5, 2024
1 parent d2a61e1 commit 5f58b43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,12 @@ Prior to `uuid@11`, it was possible for `options` state to interfere with the in

## Known issues

### React Native / Expo
<!-- This header is referenced as an anchor in src/rng-browser.ts -->
### "getRandomValues() not supported"

This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:

#### React Native / Expo

1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point:
Expand Down
7 changes: 6 additions & 1 deletion README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,12 @@ Prior to `uuid@11`, it was possible for `options` state to interfere with the in

## Known issues

### React Native / Expo
<!-- This header is referenced as an anchor in src/rng-browser.ts -->
### "getRandomValues() not supported"

This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:

#### React Native / Expo

1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point:
Expand Down

0 comments on commit 5f58b43

Please sign in to comment.