Swivel interview question

About useEffect hook and why depenedence array is important