Emoji Picker is downloading a ton of png emojis every render
Closed this issue · 1 comments
EsotericCoder commented
Using emoji picker in react and it is causing my app to render slower as it waits for all the emojis to download. I noticed your demo app does not download these same emojis. How should I configure to get the same results?
` const renderEmojiPicker = () => {
if (isMuted || isFrozen || isMobile) return null
const pickerClassName = `emoji-picker position-absolute z-index-top-nav ${
showEmojiPicker ? "" : "d-none"
} ${
emojiPickerPosition === "top" ? "emoji-picker-top" : "emoji-picker-bottom"
}`
return (
<div className="message-input-buttons me-2">
<button className="btn unstyled-btn" onClick={onShowEmojiPicker}>
<Emoji />
</button>
<div ref={emojiPickerRef} className={pickerClassName}>
<EmojiPicker
onEmojiClick={onEmojiClick}
searchDisabled={true}
emojiStyle={"apple"}
skinTonesDisabled={true}
native={true}
height={240}
previewConfig={{
showPreview: false,
}}
/>
</div>
</div>
)
}`
ealush commented
Use emojiStyle "native", instead of "apple". Won't download any images.