Importing instantsearch.js into Vue component


Based on this post I’ve gone ahead and imported instantsearch into a Vue component using:

import instantsearch, { connectors, widgets } from 'instantsearch.js/dist/instantsearch';

Is this the recommended and stable, long term approach? I know there’s no guarantee but just checking this is best practice before we roll it out on production.


Why don’t you use Vue InstantSearch? It’s made to use in Vue.

this is indeed the correct guide to follow:

Great thanks.
Tried vue instant search but I have a project requirement for the refinement list to show in the urlSync.
From work I did previously I only managed to get the query to sync via vue router and not the refinement list unfortunately. Shame though as vue instansratch is really nice.

I’m importing instantsesrch js into a vue instance as thought could use vue data in amongst the layout. Not had to do so though so far so may alas switch to vanilla instant search.js at some point :upside_down_face:

Thanks for the quick reply.

Can you describe what you tried to make url sync work with refinement list, if you had problems with it, we should fix those in the guide.


Hi @haroen, I think it may still be open on here:

Many thanks