Android
[React Native] 텍스트에 이모지(emoji) 넣기
NaDuck
2022. 9. 20. 17:00
step 1. 이모지 유니코드 알아내기
https://unicode.org/emoji/charts/full-emoji-list.html
Full Emoji List, v15.0
Full Emoji List, v15.0 Index & Help | Images & Rights | Spec | Proposing Additions This chart provides a list of the Unicode emoji characters and sequences, with images from different vendors, CLDR name, date, source, and keywords. The ordering of the emoj
unicode.org
step 2. String.fromCodePoint(유니코드값)
예를 들어 "grinning face" 이모지는 유니코드가 "U+1F600"이고, 이를 코드에서는 hex인 "0x1F600" 으로 변환해준다.
import { Text } from "react-native";
// U+1F600 => 0x1F600
const grinningFace = 0x1F600
<Text>{String.fromCodePoint(grinningFace)}</Text>