Encountered two children with the same key warning
オープン
- 主要言語
- JavaScript
- スター
- 11.9k
- フォーク
- 2.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hey, at first I want to say that I just found this lib and I want to say that it made easier life for me => so thank you a lot.
second I'm having an issue right now.
Here is the error log:
``` Warning: Encountered two children with the same key, `original4`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.```
here is my code snippet:
```
import React from "react";
import Slider from "react-slick";
export default function Types({ typeList, setName }) {
if (typeList.length === 0) return
empty type
;
const settings = {
dots: true,
infinite: true,
centerPadding: "60px",
slidesToShow: 3,
speed: 500,
rows: 2,
slidesPerRow: 2,
autoplay: true,
autoplaySpeed: 2000,
pauseOnHover: true,
arrows: false,
lazyLoad: true,
};
return (
{typeList.map((p, i) => (
setName(p.name);
}}
/>
))}
);
}
```
Thanks
コントリビューションガイド
評価
この issue はまだ評価されていません。