KPS250 / react-native-flatlist-slider

React Native Image Slider with FlatList
186 stars 46 forks source link

Warning: Each child in a list should have a unique "key" prop. #7

Closed 4cc3ssX closed 4 years ago

4cc3ssX commented 4 years ago

Indicator Warning

When run module with Indicator, following warning reveal in react native

Warning: Each child in a list should have a unique "key" prop.

Check the render method of Indicator. See https://fb.me/react-warning-keys for more information. in View (at Indicator.js:38) in Indicator (at FlatListSlider.js:115) in RCTView (at View.js:34) in View (at FlatListSlider.js:75) in FlatListSlider (at Zoom.js:34)

Capture

Step to reproduce

It's pretty easy. Go to the module path node_modules/react-native-flatlist-slider/src and edit at <View> and add key={i} in Indicator.js

Capture1

gjungic commented 4 years ago

I have the same problem.

augini commented 4 years ago

Hello Guys . As far as I am concerned, this issue has been fixed since I created a pull request for this issue and the author merged it. However if you are still having this problem with the latest version, add key ={i.toString()} to the view in indicator.js

gjungic commented 4 years ago

Hello Guys . As far as I am concerned, this issue has been fixed since I created a pull request for this issue and the author merged it. However if you are still having this problem with the latest version, add key ={i.toString()} to the view in indicator.js

Probably it's not released yet. The latest npm version is 1.0.4 without key in Indicator.js.

4cc3ssX commented 4 years ago

Ok. so I'll close this issue.