justinmahar / react-social-media-embed

📰 Easily embed social media posts from Facebook, Instagram, LinkedIn, Pinterest, TikTok, X (Twitter), and YouTube in React.
https://justinmahar.github.io/react-social-media-embed/
MIT License
215 stars 30 forks source link

TiktokEmbed - Warning: Prop `id` did not match. #40

Open tigerdi opened 1 year ago

tigerdi commented 1 year ago

Getting the following warning when using the TiktokEmbed component: Warning: Prop 'id' did not match. Server: "5d851a36-e58a-4967-9d52-122c907a0792" Client: "eeb0cf21-c3ea-4513-a566-05d7fe32e932"

I am using it in a nextjs site, and have updated to version 2.3.5

zeghmouri commented 1 year ago

Hello @tigerdi I think that the issue problem is related to the Next js server-side rendering. Maybe there is a problem with initializing the id value you should ensure that it's done on the client side only, you can do that inside a UseEffect hook. Can you share with us your code where you are using the TikTokEmbed component?