Skip to content
Advertisement

“Each child in a list should have unique key” error persists after adding key prop

New to react native, and I know that each list element needs a unique key prop, but I thought I provided one here in the text element. Please guide me in the right direction.

JavaScript

enter image description here

This is the array I’d like to destructure in firebase BadIngr = [“Peanuts”, “Dairy”]

Advertisement

Answer

As @jnpdx mentioned change your code as follows:

JavaScript
Advertisement