Implementing the Pagination Component
Learn how to set a number of products that appear per page instead of showing all of them together and letting the user scroll endlessly.
We'll cover the following...
Overview
In this lesson, we will be looking into how we can add pagination to our result page to improve the user experience with our search functionality.
Implementation
The Pagination
component displays a pagination toolbar that allows the user to change the current page.
To add the Pagination
component, we need to import it as follows:
import React from 'react';
import {
Hits,
InstantSearch,
SearchBox,
Pagination
} from "react-instantsearch-dom";
class App extends React.Component {
render() {
return (
<div>
<InstantSearch>
<SearchBox/>
<Hits hitComponent={Hit} />
<Pagination />
</InstantSearch>
&l
...