879479119 / react-native-shadow

A SVG shadow component powered with react-native-svg,which can provide shadow on Android like iOS ^_^
MIT License
612 stars 82 forks source link

BoxShadow Issue #20

Open callmejm opened 7 years ago

callmejm commented 7 years ago

I getting this error when try to use BoxShadow in my project.

Warning: Each child in an array or iterator should have a unique "key" prop.
Check the render method of `BorderShadow`. See https://fb.me/react-warning-keys for more information.
in Svg (at BorderShadow.js:35)
in BorderShadow (at index.android.js:334)
in RCTView (at View.js:113)
in View (at index.android.js:333)
in RCTView (at View.js:113)
in View (at CardStack.js:400)
in RCTView (at View.js:113)
in View (at AnimatedImplementation.js:1865)
in AnimatedComponent (at Card.js:28)
in Card (at PointerEventsContainer.js:55)
in Container (at CardStack.js:443)
in RCTView (at View.js:113)
arcollector commented 7 years ago

you must set up a key param when you are using a loop that output ReactElements, for example

items.map((item,i) => <View key={i}>{i}</View>)