Continuing the discussion from How to implement proximity search in app search:
I am trying to get this to work but am struggling to convert the pseudo code into working code.
Are you able to explain this some more, for a react newbie?
Pseudocode from How to implement proximity search in app search - #11 by JasonStoltz
state = {
engine: 'engine1'
}
const connector = new AppSearchAPIConnector({
searchKey: "",
engineName: this.state.engineName,
hostIdentifier: ""
});
return <SearchProvider
config={{
apiConnector: connector
}}
>
<div>
<SearchBox />
<Tab1 id="tab1" onClick={() => setState({ engine: 'engine1' })}/>
<Tab2 id="tab1" onClick={() => setState({ engine: 'engine2' })}/>
</div>
</SearchProvider>