Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async updateBrightness() {
this.setState({
normalBrightness: await Brightness.getBrightnessAsync(),
systemBrightness: await Brightness.getSystemBrightnessAsync()
});
}
}
function getBrightness() {
return getBrightnessAsync().then(setData);
}