I have a list: data. Then when I update the list, it renders all the elements again. For example, let's say there are 10 items. One of these has changed. 10 items are rendering again. But since 9 of them are the same, they should not be rendered again. How can I do?
const Item =({item}) => (
<Text>{item.name}</Text>
)
const List = () => {
const [data, setData] = useState([..]);
return (
<FlatList
data={data}
renderItem = {Item}
>
)}
export default List;