emoji-mart rendering duplicate emoji pickers
See original GitHub issuehave recently started using this package. Followed instructions but whenever I call on emoji-mart it displays two emoji-pickers instead of one.
import React, { useEffect, useRef } from 'react'
import { render } from 'react-dom'
import data from '@emoji-mart/data'
import { Picker } from 'emoji-mart'
export default function Test() {
function EmojiPicker(props) {
const ref = useRef()
useEffect(() => {
new Picker({ ...props, data, ref })
}, [])
return <div ref={ref} />
}
return(
<EmojiPicker onEmojiSelect={console.log} />
)
}
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Emoji Picker | Stream Chat - React SDK Docs - GetStream.io
The default EmojiPicker renders individual emoji objects using the NimbleEmoji component from emoji-mart. Our custom set of emojis will need to follow the ......
Read more >Next.js, loading a library client side, the component is re ...
I'm loading this library emoji-mart client side because it requires window object and then returning a component, while calling, ...
Read more >react-emoji-mart-picker - npm package - Snyk
emoji picker based on emoji-mart For more information about how to use this package see README · Ensure you're using the healthiest npm...
Read more >Customizable Slack-like emoji picker for React
Emoji Mart. Emoji Mart is a Slack-like customizable emoji picker component for React. ... native, false, Renders the native unicode emoji.
Read more >Adding emojis to your React app - LogRocket Blog
Emoji usage in React · To copy and paste the emoji inline: 😃 · To reference the Unicode identifier/mapping of the emoji HTML...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Refs keep their value in the mount-unmount-mount pattern in React 18 strict mode so you can do
The bug occurs in React Strict mode.