Created
February 29, 2020 13:42
-
-
Save rafaelpadovani/6a57701ba3cdc5f620eeeb82ae4609f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect } from 'react'; | |
import { NativeModules } from 'react-native'; | |
var DeviceInfo = NativeModules.DeviceInfoGet; | |
export default const DeviceInfoComponent = props => { | |
useEffect(() => { | |
DeviceInfo.getDeviceID((err, deviceID) => { | |
if (err) { | |
// error | |
} else { | |
// device ID returned | |
console.log(deviceID); | |
} | |
}) | |
}, []); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment