I have this useEffect hook
useEffect(() => {
console.log('mark useEffect', compatibleProducts);
if (Object.keys(compatibleProducts.rims).length === 0
&& Object.keys(compatibleProducts.tires).length === 0) return;
}, [compatibleProducts,...]);
As you can see in the picture the state with the (COMPATIBLE_PRODUCTS) changes at the last line. In the state I check, indeed values are added, but the useEffect hook doesn't trigger again.
Any reason why it does this ?




compatibleProducts: [...action.compatibleProducts]or spread it into the deps arrayuseEffect(() => {}, [...compatibleProducts]useEffect(() => {}, [{...compatibleProducts}]BecauseuseEffect(() => {}, [...compatibleProducts]Gives me the errorType 'CompatibleProductsInterface' must have a '[Symbol.iterator]()' method that returns an iterator.. Even so, it still doesn't work