How to use the react-instantsearch-dom.connectStats 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 algolia / react-instantsearch / examples / e-commerce / widgets / SaveFiltersMobile.js View on Github external
import React from 'react';
import { connectStats } from 'react-instantsearch-dom';
import { formatNumber } from '../utils';

const SaveFiltersMobile = ({ nbHits, onClick }) => (
  <button>
    See {formatNumber(nbHits)} results
  </button>
);

export default connectStats(SaveFiltersMobile);
github algolia / react-instantsearch / examples / e-commerce / widgets / ResultsNumberMobile.js View on Github external
import React from 'react';
import { connectStats } from 'react-instantsearch-dom';
import { formatNumber } from '../utils';

const ResultsNumberMobile = ({ nbHits }) =&gt; (
  <div>
    <strong>{formatNumber(nbHits)}</strong> results
  </div>
);

export default connectStats(ResultsNumberMobile);