next.js
df67fa10 - fix(youtube-embed): each child in a list should have a unique "key" prop (#57579)

Commit
2 years ago
fix(youtube-embed): each child in a list should have a unique "key" prop (#57579) Hi, I added a key in the map iteration of scripts in Youtube Embed. I use the index as a key but maybe there are a better solution about this like script.url + index 🤔 There isn't open related issues with this PR as this moment. ```js {scripts?.map((script, index) => ( <Script key={index} src={script.url} strategy={scriptStrategy[script.strategy] as ScriptProps['strategy']} stylesheets={stylesheets} /> ))} ```
Author
Parents
Loading