Warning:Each child in an array or iterator should have a unique "key" prop.
agilests opened this issue · comments
react-native-shadow:^1.2.1
react-native-svg:^6.0.0
Report this Warning:Each child in an array or iterator should have a unique "key" prop.
in Svg(at BorderShadow.js:35)
just add key prop to parent element inside map arrow function
[1,2,3,4].map((item, key) => {
return
})
If I only have one component, how can I add the key?
like this:
{[
<TextInput
style={searchSuggestionsStyles.inputStyle}
underlineColorAndroid="transparent"
placeholder={'Enter a subject, course or tutor name...'}
placeholderTextColor="#B0ACAC"
spellCheck={false}
returnKeyType="search"
/>]}