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

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


My best guess would be that this line is producing duplicate key's.

keyExtractor= { x => x.id }


In this line, keyExtractor= { x => x.id } the id might have been duplicated. Eg.[{"id":1,"name":"hello"},{"id":1,"name":"world"}] Both the values have same ids.

Try keyExtractor= { x => x } if all the values in the list are uniqueOtherwise you can use any property in a list. Eg .keyExtractor= { x => x.name }


The problem with using database ids as keys is that depending on your query, your database can return rows with duplicate ids. I use uuid (https://www.npmjs.com/package/uuid) in my projects, it works like a charm!