I have such lifecycle hook
componentDidUpdate(prevProps) {
// Typical usage (don't forget to compare props):
if (prevProps.activeItems !== this.props.activeItems) {
this.props.doAction();
}
}
and props have such a structure
[
{id:1, hidden: true},
{id:2, hidden: false}
{id:3, hidden: true}
]
I need to check if property hidden is the same in prev and next props for in every object, so I will know if I need to run function in if condition or no. How can I do that?