This release had so much help from the community it was great! Thanks everyone for helping make the module better ❤️
- BREAKING: (from 4.0.2-rc.1) getDeviceType is constant now - no need for getDeviceTypeSync
This is a tiny breaking change, easy to adopt:- getDeviceTypeSync --> getDeviceType
getDeviceType.then(type => {});
-->let type = getDeviceType();
- feat: Hooks! Add
useBatteryLevel()
,useBatteryLevelIsLow()
,usePowerState
methods (thanks @magrinj!) - fix: iOS use CFBundleName if CFBundleDisplayName null (Fixes #846, thanks @rizwankce!)
- chore: add support for 2019 iPads models in 'model' mapping (thanks Edward Wong!)
- chore: add support for motorola one vision in hasNotch (thanks @euharrison!)
- docs(README): Fixed link in TOC (thanks @martinvol!)
- docs(README): Fixed example code hasNotch() - constant, no Promise (thanks @cereme!)
- docs(README): Fixed example code getDeviceId() - constant, no Promise (thanks @adambutler!)
- docs(README): Fixed getReadableVersion() sub-API references (thanks @djorkaeffalexandre!)
- chore: yarn upgrade --latest to update dependencies (@mikehardy)