What is the Best Approach to Deal with the Categories and SubCategories in instant search using react?

how can we show Categories and SubCategories in facets other than using HierarchicalMenu
preferably using some get request e.g we can get the hierarchical list and we can search the list by hitting some get request and sending query params and in response we get the updated list according to the prarams

or what is the best approach to deal with Categories and SubCategoires

Hi Qasim,

The HierarchicalMenu widget holds all the logic to retrieve sub-categories efficiently with Algolia, but you’re free to fully customize the UI using the connectHierarchicalMenu connector.

The provided props include items, which is a collection of objects which themselves might contain items, and update whenever you refine the parent item (with the refine provided function). You can walk this hierarchy recursively to build your own widget in the way you think is best.