usePagination: Maximum update depth exceeded

Hi, I am new to Algolia and I am using it to display data to a table. I use useInstantSearch for the result data and usePagination for the pagination. I just have a problem, when I initially load the page it is working fine but when I go to another route then go back to the initial route (Home page => User Page => Home Page), it is giving me error “Maximum update depth exceeded”. I am not sure what causes the error but when I removed the usePagination it is working fine.

Thank you for helping.