Does the object reinitialized when the component re-renders in React

In short answer, yes!

so in this specific case where you use any non-primitive (object or array) as a dependency of useEffect. It cause the useEffect to fire the code everytime the component re-renders.

The component re-renders everytime the button is clicked