Skip to content

Commit a983b4e

Browse files
committed
docs: restore react native note
1 parent ab54e81 commit a983b4e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (form
1212
- CommonJS, [ECMAScript Modules](#ecmascript-modules)
1313
- NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
1414
- Chrome, Safari, Firefox, Edge browsers
15+
- [React Native / Expo](#react-native--expo)
1516
- **Secure** - Cryptographically-strong random values
1617
- **Compact** - No dependencies, [tree-shakable](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking)
1718
- **CLI** - Includes the [`uuid` command line](#command-line) utility
@@ -479,6 +480,17 @@ Prior to `uuid@11`, it was possible for `options` state to interfere with the in
479480
- Without `options`: Internal state is utilized to improve UUID uniqueness.
480481
- With `options`: Internal state is **NOT** used and, instead, appropriate defaults are applied as needed.
481482

483+
## Known issues
484+
485+
### React Native / Expo
486+
487+
1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
488+
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:
489+
490+
```javascript
491+
import 'react-native-get-random-values';
492+
import { v4 as uuidv4 } from 'uuid';
493+
```
482494
---
483495

484496
Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>

README_js.md

+13
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (form
2626
- CommonJS, [ECMAScript Modules](#ecmascript-modules)
2727
- NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
2828
- Chrome, Safari, Firefox, Edge browsers
29+
- [React Native / Expo](#react-native--expo)
2930
- **Secure** - Cryptographically-strong random values
3031
- **Compact** - No dependencies, [tree-shakable](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking)
3132
- **CLI** - Includes the [`uuid` command line](#command-line) utility
@@ -486,3 +487,15 @@ Prior to `uuid@11`, it was possible for `options` state to interfere with the in
486487

487488
- Without `options`: Internal state is utilized to improve UUID uniqueness.
488489
- With `options`: Internal state is **NOT** used and, instead, appropriate defaults are applied as needed.
490+
491+
## Known issues
492+
493+
### React Native / Expo
494+
495+
1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
496+
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:
497+
498+
```javascript
499+
import 'react-native-get-random-values';
500+
import { v4 as uuidv4 } from 'uuid';
501+
```

0 commit comments

Comments
 (0)