1. react-native-uuid
⚠️ Caution
react-native-uuid
appears to support up to v5 at the time of writing.
npm install react-native-uuid
import uuid from 'react-native-uuid';
uuid.v4();
2. uuid (and plus)
npm install uuid react-native-get-random-values
npx pod-install
import 'react-native-get-random-values'; // This must precede `uuid`
import { v4 as uuidv4 } from 'uuid';
uuidv4();
I really don't understand why not using the browser built-in
crypto.randomUUID()