Load More button working only on the second click


i am trying to implement the load more functionality using infinite hits , but it is working only on the second click of the button, I have referred the same code shown in the documentation. I can see the API call being made in the network tab , but the results are not being displayed

Any idea why that is happening?

I have referred the below documentation https://www.algolia.com/doc/api-reference/widgets/infinite-hits/react/#full-example:~:text=Full%20example-,%23,-component