[VirtualizedList] - Warning: Each child in an array or iterator should have a unique "key" prop.
See original GitHub issueHello, 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:
- Created 6 years ago
- Comments:18 (18 by maintainers)
@soukupl Feel free to PR 😃, also need to do the following:
key
(you can import the table and edit here: http://www.tablesgenerator.com/markdown_tables)@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")