react-native-unique-id
v2.0.0
Published
generates a guid and stores it in the async store
Downloads
2,249
Readme
react-native-unique-id
generates a guid and stores it in the async store This is supposed to identify the device / user. It creates a guid if no exists and stores it in the AsyncStorage. If a Guid exists, this will be returned
Usage
npm install react-native-unique-id --save
const uniqueId = require("react-native-unique-id");
uniqueId()
.then(id => console.log(id))
.catch(error => console.error(error));
// or callback style
uniqueId((error, id) => {
if (error) return console.error(error);
console.log(id);
});