Just got this surprising error after using uuid for so long
Environment
"react-native": "0.63.2"
"react-native-get-random-values": "^1.4.0"
"uuid": "^8.3.0"
What was tried
I get this error when const id = uuidv4() runs. I added "react-native-get-random-values" as suggested, but with yarn and imported it this way;
import React, {useState} from 'react';
import 'react-native-get-random-values';
import {v4 as uuidv4} from 'uuid';
import RNPickerSelect from 'react-native-picker-select';
I am still getting the same error. Have to figure out other ways to generate a random ID then.
[Clear, concise description of the problem]
How to reproduce
- Install the uuid and react-native-get-random-values
- try running a component with this
const id = uuidv4()
Expected behavior
Should generate random ids
Runtime
- OS: macOS
- Runtime: react-native
- Runtime Version: 0.63.2