Closed
Description
I want to implement areStatesEqual
in such a way that it only compares the relevant state for a container. However, this relevant state might be dependent on the container's own props. E.g. suppose my state looks like this:
{
users : {
1 : { /* user1 */ },
2 : { /* user2 */ }
}
}
and I have a container <User id={userId}>
. Currently, I can't access the id from the areStatesEqual
function, and as such the best I can do is compare the entire users
object. This gives a lot more false positives though, and is generally more expensive as well. If I had access to the properties of the container then I could make a much more efficient areStatesEqual
function.
Metadata
Metadata
Assignees
Labels
No labels