How to use the vue-instantsearch.createInstantSearch function in vue-instantsearch

To help you get started, we’ve selected a few vue-instantsearch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github algolia / vue-instantsearch / examples / ssr / src / main.js View on Github external
export async function createApp({
  beforeApp = () => {},
  afterApp = () => {},
} = {}) {
  const router = createRouter();
  const { instantsearch, rootMixin } = createInstantSearch({
    searchClient,
    indexName: 'instant_search',
    // other options, like
    // stalledSearchDelay: 50
  });

  await beforeApp({
    router,
    instantsearch,
  });

  const app = new Vue({
    mixins: [rootMixin],
    router,
    render: h => h(App),
  });