react-native-google-places-autocomplete icon indicating copy to clipboard operation
react-native-google-places-autocomplete copied to clipboard

fix: Add polyfill for crypto.getRandomValues in React Native

Open Arshiash80 opened this issue 1 year ago • 4 comments

This PR adds a polyfill for the global crypto.getRandomValues method in React Native by installing react-native-get-random-values. This polyfill is required because React Native does not natively support crypto.getRandomValues, which is used by uuid and other libraries that rely on it for random ID generation.

The polyfill ensures that these libraries can function correctly in a React Native environment without causing the "Error: crypto.getRandomValues() not supported" issue.

Fixes #950.

Arshiash80 avatar Oct 08 '24 03:10 Arshiash80