react-native-shortcut-badger
Version:
A react-native wrapper for ShortcutBadger
24 lines (18 loc) • 699 B
Markdown
# How to use it
## Add package react-native-shortcut-badger to react-native project
```
$ npm i --save react-native-shortcut-badger
$ react-native link react-native-shortcut-badger
```
## Import the module and use it in your react-native code
```js
import BadgeNumberAndroid from 'react-native-shortcut-badger'
...
BadgeNumberAndroid.setNumber(5)
```
## Run the project on supported devices and check:
```
$ react-native run-android
```
<img src="https://raw.githubusercontent.com/nguquen/react-native-shortcut-badger/master/screenshot.png" alt="screenshot" width="50%">
You can see the list of supported devices at [leolin310148/ShortcutBadger](https://github.com/leolin310148/ShortcutBadger)