Widgets Stats

Description

The Stats component displays the total number of matching hits and the time it took to get them (time spent in the Algolia server).

Props

This widget has no props.

Example usage

import React from 'react'; import { InstantSearch, Stats, Hits } from 'react-instantsearch-dom'; const App = () => ( <InstantSearch appId="latency" apiKey="6be0576ff61c053d5f9a3225e2a90f76" indexName="instant_search" > <Stats /> <Hits /> </InstantSearch> );

CSS classes

.ais-Stats {}

the root div of the widget

.ais-Stats-text {}

the text of the widget - the count of items for each item

Translation keys

stats

The string displayed by the stats widget. You get function(n, ms) and you need to return a string. n is a number of hits retrieved, ms is a processed time.