I have an
onSearchStateChange prop on
InstantSearch which receives a
searchState parameter from the
I am also working with multiple indices, so I can see page changes if I look at
And I also have pure functions
searchStateToUrl which generate the desired URL based upon the
searchState which is generated by
I am also using an endless scroll package (
react-infinite-scroll-component) which has worked rather well with
There is some complexity to all of these connections, and I am not 100% sure that everything is hooked up properly. But, for the most part, it does what I expect.
I am at the moment trying to fine-tune the browser’s forward and back buttons to move through the progression of search states. I’ve had some luck with this, but getting it to work perfectly has proven to be tricky.
One thing that I am noticing is that
onSearchStateChange is not firing for me on pagination events. I can detect these changes with
componentDidUpdate (since I can there perform a comparison of
prevState.searchState to detect the page change event). But, this does not really update the URL as expected.
Is there a way to make these pagination events show up for