V2 Technologies Interview Question

Why dependency array is important for useEffect