alexandre-garrec / react-swipe-card

Tinder style swipe cards
https://alexandre-garrec.github.io/react-swipe-card
136 stars 79 forks source link

Warning: Each child in an array should have a unique "key" prop. #5

Closed zdenham closed 7 years ago

zdenham commented 7 years ago

The node module with the demo code kept throwing this warning. Was able to quiet it by changing line 132 in Cards.js (in node_module) to:

{ className: (_this3.state['alert' + d] ? 'alert-visible' : '') + ' alert-' + d.toLowerCase() + ' alert', key : d },

just adding the key: did the trick, but I'm not sure if thats a permanent fix

alexandre-garrec commented 7 years ago

It's done !