Do react useEffect hook also cache dependency list values like how useMemo does there by comparing and re-render?