Reading Facet_Stats in React InstantSearch

I’m sure this is a silly question, but I cannot find it in the docs…

How do I connect to facet_stats using React InstantSearch? It doesn’t seem to be in the docs. Thank you in advance!

facet_stats is an Algolia internal that you’re not supposed to manipulate with React InstantSearch. InstantSearch provides higher-level primitives to hide these details.

Could you please explain what you’re trying to achieve?

Thanks @francoischalifour!

I’m not trying to manipulate it, just get access to the object. ‘connectHits’ gives access to the hits. What’s the equivalent ‘connectFacetStats’?

Right, I see! You can use the connector connectStateResults to access facet_stats.

I made an example on this sandbox.

Hope this helps!

@francoischalifour

Thanks so much for the time and example! I knew the answer was straight forward, but after an hour searching the docs, I got flustered.

For some reason, I ignored connectStateResults because facet didn’t seem like it was part of state.