I have a Search component that inits the SearchStore via
createFromAlgoliaCredentials and then accepts the index name as a prop. A bit like this:
I’m required to have multiple instances of this component on one page, but when I do this in a parent component (passing in different indexes for each instance)…
… they all return results from
indexName3, not their correct corresponding indexes.
I’m pretty sure this is because the SearchStore is only initialised once within the SearchSelect component.
What’s the best practice in this situation? I’m trying to avoid having multiple components that provide the exact same functionality.