N Kaushik

How to create an uuid in a react native application

April 16, 2021

How to create an uuid in a react native application:

One package is available to create an uuid in ReactNative. This library is called react native uuid. As mentioned in the doc, it is a TypeScript implementation of RFC4122 standard A Universally Unique IDentifier (UUID) URN Namespace.

Installation:

You can install it using npm:

npm install react-native-uuid

Usage:

Import and use it:

import uuid from 'react-native-uuid'; uuid.v4();

Full documentation:

Documentation for all methods are available here.


Subscribe to my Newsletter

© 2021, nkaushik