-
Notifications
You must be signed in to change notification settings - Fork 157
Store.refresh() not working with Nuxt? #380
Comments
As an update to this issue, I've tried a number of methods to trigger a reload ( However, a hacky way to get around this is to change the query via a method ( I'll leave this issue open another few days in case anyone has thoughts on why new characters would cause Algolia to get current data. I'll keep experimenting with hacks on the query to update the data and why that's happening, but i'd really love to see a working example of the |
that’s really odd, could you make this into a full github repository or example on Glitch so we can try it out? In the meantime, another example that works to my knowledge is this one: https://github.com/algolia/vue-instantsearch-examples/tree/master/examples/nuxt |
I've been using that example since it was first added to the docs in September I think. Everything works fine except the refreshing which back then their didn't exist a method for. I saw it was introduced at algolia/react-instantsearch#619 for the react library, and that according to your issue #366 it has also been added to the vue version. Maybe I'm just misunderstanding how refresh is supposed to work? I thought that when called it would grab the current version of the search store but that could be wrong. But yes I'll make a repo later to show exactly what I mean. |
Vue InstantSearch v1 is no longer supported for now, please open a new issue if this issue persists in newer versions. |
I'm trying to test the
searchStrore.refresh()
method with Nuxt, and don't seem to be seeing any result. To test I'm changing my data in algolia, and then calling the methodalgoliaRefresh
and looking for changes.As shown below I'm using the Nuxt setup from this example, and referencing the created store with
this.searchStore.refresh()
in myalgoliaRefresh
function. I don't notice any change in the data until I leave the page and return to remount the component.Currently to update Algolia data I've been reloading the entire page, but thats obviously a poor solution. As Algolia needs to be at the page level when using Nuxt, I can't wrap it in a parent component to remount just that component without reloading the entire page. Is their a suggested way to get around this? Or is
Store.refresh()
the only way to refresh data?The text was updated successfully, but these errors were encountered: