0๐
Iโve spent almost the whole day and I actually made it to Algolia to work with Nuxt.
plugins/index.js
was not the issue
This function below was breaking everything apart :/
serverPrefetch() {
return this.instantsearch.findResultsState(this).then(algoliaState => {
this.$ssrContext.nuxt.algoliaState = algoliaState;
});
},
Would somebody be able to explain what the function above is doing, please?
and also the one below. Because I cannot see any difference in functionality after removing those.
beforeMount() {
const results = this.$nuxt.context.nuxtState.algoliaState || window.__NUXT__.algoliaState;
this.instantsearch.hydrate(results);
},
Source:stackexchange.com