Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
DeviceInfo.gatherDeviceInfo().then((result) => {
const deviceInfo = stringify(result);
this.setState({ deviceInfo });
});
codePush.getCurrentPackage().then((result) => {
const packageInfo = result ? stringify(result) : 'no package';
this.setState({ packageInfo });
});
}
export const getCodePushHash = () => codePush.getCurrentPackage().then(result => (
result ? result.packageHash.slice(0, 7) : '00000000'
));