If you omit the dependency array in useEffect, the effect will run on every render, leading to potential performance issues and infinite loops if not handled properly.