I added the keys like that:
export const Field = ({ state, onCellPress }) => {
return (
<View style={styles.field}>
{ state?.map((row, rowIndex) => (
<View style={styles.row} key={`${rowIndex}`}>
{ row?.map((value, columnIndex) => (
<Cell
text={value}
onPress={onCellPress}
row={rowIndex}
column={columnIndex}
key={`${columnIndex}`}
/>
))}
</View>
))}
</View>
);
}
But I still get the warning "Each child in a list should have a unique "key" prop. I tried also like that:
<Cell
text={value}
onPress={onCellPress}
row={rowIndex}
column={columnIndex}
key={`${rowIndex}:${columnIndex}`}
/>
But I still get it. What do I do wrong?