0

我想向react-native-device-info's添加一个侦听器,isBatteryChargingSync()以便在有人插入或拔出他们的设备时更新状态。我尝试添加isBatteryChargingSyncuseEffect但这并没有做任何事情。我怎样才能做到这一点?谢谢!

这是异步版本:https ://www.npmjs.com/package/react-native-device-info#isbatterycharging

4

0 回答 0