Closed jpengelbrecht closed 11 months ago
Hey,
Thanks for the feedback. I am aware that it may not be easy to understand it as the whole process of enabling Vue Instantsearch on SSR is not easy :(
Take a look at the official docs -> https://www.algolia.com/doc/guides/building-search-ui/going-further/server-side-rendering/vue/
It is because this library is mainly client side. It is possible to get it working in SSR but it is not easy as you can see from both Algolia and the module docs.
I am completely into the idea of Stackblitz. I think this would help a lot (and also maybe we would find ideas to improve the docs as well).
If anyone is up for creating such a Stackblitz, please let me know. If not, I will do it in the upcoming weeks :)
Maybe @camaech you would be interested in creating a Stackblitz link? :)
Having a lot of trouble getting SSR to work properly using routing or intialstate, also the render function doesn't seem to add the widgets properly to the returned state. A fully fledged example would be great
Has anyone managed to get this to work?
Yeah I did, got it working with custom routing as well and a component render function… discovered that i needed virtual widgets to get the initial query working properly as the components present in the render function weren’t enough to set the initial query. I can try to cobble together a minimal example next week sometime if that helps
@plexus77 that would be really awesome! Maybe you could also create a Stackblitz example? That would be more than amazing :)
That would be very much appreciated. Thanks @plexus77
Here you go guys :)
https://stackblitz.com/github/plexus77/nuxt-3-algolia-ssr?file=README.md
We discovered while creating this example that it seems to render a html string on the server using the single file vue template rather than the render function in the ssr component.
I think the render function is needed, though it does feel like there should be a better solution available for this
Thank you so much @plexus77 ! I will add it to the documentation :)
sorry if this is the wrong place to add this.
I am reading the docs and i am finding the SSR. But the documentation for client side and SSR is confusing as hell. Client side is clear enough, but the SSR starts borrowing steps from the client side explanation and at some point its not clear what is needed in each step.
i think this would be a lot easier if there was just a full SSR example. maybe even get a stackblitz working with it.