Search UI Get State from other components?

How can I access the state of filters and active facets from outside of the facet components themselves? It only looks like I would need to read the URL directly myself.

My understanding of React is that you generally can't access the state of components from outside of the component itself. You could maybe use a callback function as a prop, which could pass the state of something back "up". While it isn't Search UI-specific, I've found a medium article describing how this can be achieved in general React: link.

You should be able to using the HOC withSearch WithSearch & withSearch | Elastic docs to retrieve the request state

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.