Data required for the picker to work has been completely decoupled from the library. That gives developers the flexibility to better control their app bundle size and let them choose how and when this data is loaded. Callback when the Add custom emoji button is clicked. The button will only be displayed if this callback is provided. It is displayed when search returns no results. You can use custom emojis by providing an array of categories and their emojis. Emojis also support multiple skin tones and can be GIFs or SVGs. You can use custom category icons by providing an object with the category name as key and the icon as value. Currently supported formats are svg string and src. First, you need to make sure data has been initialized. You need to call this only once per page load. Note that if you call init like this, you don’t necessarily need to include data in your Picker props. It doesn’t hurt either, it will noop.
Features
- Picker renders instantly, data is available offline
- Slower initial page load (bigger file to load)
- Data fetched only when needed, does not affect your app bundle size
- Fetched remotely
- Network latency, doesn’t work offline (unless you configure a ServiceWorker)
- Localization data to use for the picker