Say i have a useEffect which depends on some object that is passed as part of the component’s props. How does useEffect know when it should execute its inside? In other words, is it going to check the reference (ie, even if the value-wise the object is the same but ref has changed) and fires if ref has changed or is it going to comapare object key,values? How about the primitive types such as strings?
submitted by /u/hassanzadeh