Pass props through connectInfinitesHits


I’ve seen answers to my problem else where on the forums but I can’t seem to make it work for me.

I’m using React Native and I want to pass custom props to a component made with connectInfiniteHits (or any HOC). I currently have something like thisthis:

const CustomHits = connectHits(({hits, data}) => {
        return ... // hits rendering

<CustomHits data="test" />

but when I log the data I get undefined.

Any help would be greatly apprciated!

Hi @c.ryan,

Your example should work. I made an example with your snippet:

Hope that helps, let me know if you still have issues :wink: