How to use the react-instantsearch-dom.connectInfiniteHits function in react-instantsearch-dom

To help you get started, we’ve selected a few react-instantsearch-dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codesandbox / codesandbox-client / packages / app / src / app / components / CreateNewSandbox / CreateSandbox / Explore / SearchResults / ExploreResultList.tsx View on Github external
};

  return (
    <>
      

      <div id="bottom-detection-element" style="{{">
    
  );
};

export const ExploreResultList = connectInfiniteHits(Results);
</div>
github yakovlevyuri / confcitizens / components / card / Cards.tsx View on Github external
const Wrapper = styled.div`
  display: grid;
  grid-gap: 10px;
`;

const ButtonWrapper = styled.div`
  display: grid;
  margin-top: 25px;

  @media (min-width: 992px) {
    justify-items: center;
  }
`;

const Cards = connectInfiniteHits(
  ({
    hits,
    hasMore,
    refineNext,
  }: {
    hits: Speaker[];
    hasMore: boolean;
    refineNext: (...args: any[]) =&gt; any;
  }) =&gt; (
    
      {hits.length ? (
        
          {hits.map(hit =&gt; (
            
          ))}
github algolia / react-instantsearch / website / examples / e-commerce-infinite / App.js View on Github external
{ value: 'instant_search_price_asc', label: 'Price asc.' },
                { value: 'instant_search_price_desc', label: 'Price desc.' },
              ]}
              defaultRefinement="instant_search"
            /&gt;
          
          
        
        
      
    );
  }
});

const ConnectedSearchBox = connectSearchBox(CustomSearchBox);
const ConnectedHits = connectInfiniteHits(CustomHits);
github algolia / react-instantsearch / stories / InfiniteHits.stories.js View on Github external
<button disabled="{!hasMore}">
          Show more
        </button>
      
    );

    MyInfiniteHits.propTypes = {
      hits: PropTypes.array.isRequired,
      hasMore: PropTypes.bool.isRequired,
      hasPrevious: PropTypes.bool.isRequired,
      refine: PropTypes.func.isRequired,
      refinePrevious: PropTypes.func.isRequired,
    };

    const CustomInfiniteHits = connectInfiniteHits(MyInfiniteHits);

    return (
       {
          urlLogger(JSON.stringify(searchState, null, 2));
        }}
      &gt;
        
      
    );
  })
  .add('with custom hitComponent', () =&gt; {
github algolia / react-instantsearch / website / examples / material-ui / App.js View on Github external
className="ClearAll"
    />
  );
}

const ConnectedSearchBox = connectSearchBox(MaterialUiSearchBox);

const ConnectedCheckBoxRefinementList = connectRefinementList(
  MaterialUiCheckBoxRefinementList
);

const ConnectedNestedList = connectHierarchicalMenu(MaterialUiNestedList);

const ConnectedSortBy = connectSortBy(MaterialUiSortBy);

const ConnectedHits = connectInfiniteHits(CustomHits);

const ConnectedCurrentRefinements = connectCurrentRefinements(
  MaterialUiClearAllFilters
);

export default withURLSync(App);
github algolia / doc-code-samples / React InstantSearch / infinite-scroll / src / InfiniteHits.js View on Github external
{hits.map(hit =&gt; (
            <li>
              
            </li>
          ))}
          <li> (this.sentinel = c)}
          /&gt;
        
      
    );
  }
}

export default connectInfiniteHits(InfiniteHits);
</li>