useStats hook provides the logic to build a custom widget that displays search statistics such as the number of hits and processing time.
Import
Parameters
This hook does not accept any parameters.Returns
The number of hits in the result set.
The number of sorted hits in the result set (when using Relevant sort).
Whether the index is currently using Relevant sort and displaying only sorted hits.
The number of pages computed for the result set.
The current page (zero-indexed).
The time taken to compute the results inside the Algolia engine (in milliseconds).
The maximum number of hits per page returned by Algolia.
The query used for the current search.