#community-help

Using Real Time Filters with Instasearch in React

TLDR Davide was questioning about using real time filters with instasearch in React. Jason clarified how it works and gave suggestions. However, Davide decided to use "raw" js client instead for personalized features.

Powered by Struct AI
May 19, 2021 (33 months ago)
Davide
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Davide
12:24 AM
Hi, I am looking into instasearch (react) is there a clean way to build real time filters with it? Filtering seems to occur at configuration level, not in real time, am I missing something? Thanks
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:28 AM
Hi Davide, you can instantiate the instantsearch adapter (with dynamic filters) and instantsearch itself on the fly. I’ve done this in Vue before, where I set the search client to be a reactive variable and every time that variable changes, instantsearch widgets also re-render automatically.
Davide
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Davide
12:29 AM
Right, after some tries I have abandoned instasearch and will be using your "raw" js client, we have quite a bit of personsalisation to do and instasearch is too opinionated to work for us. Thanks!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:31 AM
Got it, yup I’ve found instantsearch can get in your way sometimes. I haven’t done this myself, but I hear instantsearch “connectors” help you customize things extensively