question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[VirtualizedList] - Warning: Each child in an array or iterator should have a unique "key" prop.

See original GitHub issue

Hello, there is a warning in render method of VirtualizedList. Not sure if this is your problem… I wasn’t able to find it in code yet. It may be a problem of one of the dependencies… Can you please look at it? It’s only a warning, but still… 😃

` Warning: Each child in an array or iterator should have a unique “key” prop.

Check the render method of VirtualizedList. See https://fb.me/react-warning-keys for more information. in CellRenderer (at VirtualizedList.js:463) in VirtualizedList (at FlatList.js:557) in FlatList (at Column.js:129) in RCTView (at View.js:113) in View (at Column.js:121) in Column (at Masonry.js:118) in StaticRenderer (at ListView.js:464) in RCTScrollContentView (at ScrollView.js:707) in RCTScrollView (at ScrollView.js:800) in ScrollView (at ListView.js:332) in ListView (at Masonry.js:113) in RCTView (at View.js:113) in View (at Masonry.js:112) in Masonry (at PageGallery.js:13) in PageGallery (at App.js:203) in RCTScrollContentView (at ScrollView.js:707) in RCTScrollView (at ScrollView.js:800) in ScrollView (at KeyboardAwareScrollView.js:27) in KeyboardAwareScrollView (at Content.js:10) in Content (at connectStyle.js:384) in Styled(Content) (at App.js:302) in RCTView (at View.js:113) in View (at Container.js:19) in Container (at connectStyle.js:384) in Styled(Container) (at App.js:252) in RCTView (at View.js:113) in View (at index.js:570) in RCTView (at View.js:113) in View (at index.js:557) in Drawer (at index.js:10) in Drawer (at App.js:234) in RCTView (at View.js:113) in View (at Root.js:14) in Root (at connectStyle.js:384) in Styled(Root) (at App.js:233) in App (at registerRootComponent.js:36) in RootErrorBoundary (at registerRootComponent.js:35) in ExpoRootComponent (at renderApplication.js:35) in RCTView (at View.js:113) in View (at AppContainer.js:100) in RCTView (at View.js:113) in View (at AppContainer.js:121) in AppContainer (at renderApplication.js:34) `

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
brh55commented, Sep 26, 2017

@soukupl Feel free to PR 😃, also need to do the following:

1reaction
brh55commented, Sep 26, 2017

@soukupl I think that solution works well, it’s rather consistent behavior. I don’t see why you should be having any issues with refresh now with: _keyExtractor = item => "IMAGE-KEY-" + item.uri + "---" + (item.data.key ? item.data.key : "0")

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native FlatList- Warning: Each child in an array or ...
React-Native FlatList- Warning: Each child in an array or iterator should have a unique "key" prop, even after giving key={index} · Ask Question....
Read more >
Warning: Each Child in a List Should Have a Unique 'key' Prop
When creating a list in the UI from an array with JSX, you should add a key prop to each child and to...
Read more >
React Native Unique Key | React Native Sports App Tutorial
After all of that, we were left with annoying warning, 'Warning: Each child in an array or iterator should have a unique “key”...
Read more >
How to Fix 'Each child should have a unique key prop' - Webtips
Learn what is the root cause, and how to fix 'Warning: Each child in a list should have a unique 'key' prop.' warnings...
Read more >
React-Native FlatList- Warning: Each child in an ... - iTecNote
Warning : Each child in an array or iterator should have a unique "key" prop. ... in CellRenderer (at VirtualizedList.js:687) in VirtualizedList (at ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found