Question
React component re-rendering when object is a prop
If I have a component say- <Component />
which acceps props as data={a:1, b:2}
which is created after some custom operation lets say that operation is performed by a function getData()
which returns this data object.
Now this component re-renders and again getData
returns us data={a:1, b:2}
as props.
Now will my <Component />
update on UI? as the memory location of both the props is different but their properties are same?