Closed ed42311 closed 1 year ago
Okee this has something to do with the nuxt comp passing the route <nuxt :key="$route.fullPath"/>
I was able to bypass it by doing this in the default template
<div v-if="String($route.name) === 'Search___en'"><search/></div>
<div v-else ><nuxt :key="$route.fullPath"/></div>
Basically bypassing the
This is what eventually allowed me to use the integration code effectively: https://github.com/ed42311/algolia-vsf-routes/blob/main/layouts/default.vue#L11
I am however open to other suggestions
@ed42311 while your workaround seems good to me, I'm curious why you added :key
to <nuxt>
?
@eunjae-lee oh I didn't... that's part of the Vue storefront base code... in fact that was what was originally causing the re-render issue
Guess I'm curious as well... 😄
Is it some way to optimize routing? I started a conversation in vuestorefront as well: https://github.com/vuestorefront/vue-storefront/issues/5749
@ed42311 hmm I'm not sure. It's more like a way to invalidate and rerender component when $route.fullPath
changes rather than an optimization, which I'm not so sure why they put it in the first place, though.
bump! we are battling the same thing and would like to know why this was added in the first place
This is an old issue, so I'll assume that it has been fixed in the mean time. If you have more issues, please open a new issue and give a reproduction. Thanks!
Bug 🐞
What is the current behavior?
Make a sandbox with the current behavior
Don't think I can make a sandbox with nuxt... but I did create a minimal repo: https://github.com/ed42311/algolia-vsf-routes
To Repro:
What I’ve tried:
What is the expected behavior?
Does this happen only in specific situations?
Yes, this issue only occurs so far in vue storefront next branch
What is the proposed solution?
I don't have one as of yet, but I'm actively debugging, will update as I go
this issue may be similar https://github.com/algolia/vue-instantsearch/issues/916
What is the version you are using?
"vue-instantsearch": "^3.6.0"