EricPKerr/react-native-emoji

Pull Request?

alexkuttig opened this issue · 3 comments

Hi @EricPKerr,

I forked your Library and made some changes which are breaking backwards compatibility. You can see it here: https://github.com/alexkuttig/react-native-emoji

I added EmojiCompat on Android and added an export for an EmojiText, which basically is Text from 'react-native', but with EmojiCompat support on Android.

Do you want me to make a pull request or shall I publish a seperate npm package?

Best,
Alex

@alexkuttig thanks. I would merge this if you could make it backward compatible. The EmojiCompat component takes the emoji as text/UTF-8 instead of passing in the emoji name.

@EricPKerr we would have to think about how this could work out. If you look at my readme, the Emoji Component still works as it should, the only thing is that the user has to import it with import { Emoji } from 'react-native-emoji' since I have added another export for Text with Emojis.
What do you think?

@alexkuttig i'm inclined to leave the import Emoji from 'react-native-emoji' with emoji name prop interface intact.

I haven't looked into inline unicode <Text>🎉</Text> cross-platform performance, which would be more in line with the Android EmojiCompat.

If the inline version works, the likely best way to handle is to support children and name emojis in parallel where you can either pass in one or the other and this library handles switching between the two.