InstantSearch Routing + Shopify

Hello, I’m trying to use routing from instantsearch-react-hooks, and I’m currently running into an issue where when I change page using the component from hydrogen, the url clears the params, but the algolia state “RefinementList” (or page) don’t clear themselves… I’ve looked at most of the documentation for this and still haven’t managed to come to a working solution.

This is for a “Categories” page

< InstantSearch
      indexName = {algoliaIndexName}
      searchClient = {searchClient}
      routing = {routing}
    >
const routing = {
  router: history({}),
  stateMapping: {
    stateToRoute(uiState) {
      const indexUiState = uiState[algoliaIndexName];
      console.log('indexUiState');
      console.log(indexUiState);
      return {
        product_type: indexUiState.refinementList?.product_type,
        vendor: indexUiState.refinementList?.vendor,
        tags: indexUiState.refinementList?.tags,
        page: indexUiState.page,
        sortBy: indexUiState.sortBy,
      };
    },
    routeToState(routeState) {
      console.log('routeState');
      return {
        [algoliaIndexName]: {
          refinementList: {
            product_type: routeState.product_type,
            vendor: routeState.vendor,
            tags: routeState.tags,
          },
          page: routeState.page,
          sortBy: routeState.sortBy,
        },
      };
    },
  },
};