Allows to check if given emoji is renderable
MIT License
$ npm install react-native-emojis --save
$ react-native link react-native-emojis
android/app/src/main/java/[...]/MainActivity.java
import com.reactlibrary.ReactNativeEmojisPackage;
to the imports at the top of the filenew ReactNativeEmojisPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-emojis'
project(':react-native-emojis').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-emojis/android')
android/app/build.gradle
:
compile project(':react-native-emojis')
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-emojis
and add RNReactNativeEmojis.xcodeproj
libRNReactNativeEmojis.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)import EmojiChecker from 'react-native-emojis';
// Both platforms
const emojisList = [{ char: 'U+1F631' }]
const result = await EmojiChecker.canShowEmojis(emojisList);
// result => [{ char: 'U+1F631', visible: true }]
// Android only
const emoji = 'U+1F631'
const result = await EmojiChecker.canShowEmoji(emoji);
// result => true
const result = await EmojiChecker.convertToSupportedEmoji(emoji);
// result => 'U+1F632'