Search code examples
javascriptreactjssendbird

How to implement Emoji inside a messaging service like SendBird? (Web-Base App none-native)


Hello lads/las I am working on a project which trigger "SendBird" messaging service; I implemented all the basic functions but right now I am trying to use Emoji for ease of use inside it. Have no idea where to start, any suggestion Appreciate.

Need to mention I need free license service if you are suggesting any API's. :D


Solution

  • You can use ReactEmoji.

    Here's a link to the github repository : https://github.com/banyan/react-emoji.

    Just do npm install react-emoji --save to save it as a dependency to your project. Then import it to your project import ReactEmoji from 'react-emoji'.

    Then just to {ReactEmoji.emojify(*your message here*)} . The emojify function will render your message and turn it into an object, which is going to display as an icon later.