maoberlehner / vue-lazy-hydration

Lazy Hydration of Server-Side Rendered Vue.js Components
MIT License
1.18k stars 52 forks source link

Nested LazyHydrate #41

Closed simplenotezy closed 3 years ago

simplenotezy commented 4 years ago

Currently it seems not possible to next .

I have a scenario where it makes sense to LazyHydrate a component, but if the parent component is also lazy hydrated, it won't work properly. Either it should be possible to nest LazyHydrate or I could apply a setting like: <LazyHydrate only-if="shouldHydrate"> where shouldHydrate is a boolean, I could define on the parent component, to whether or not the child components should be hydrated.

Say I have a ProductDisplay, ProductSlider and ProductList. The product list will have a lot of ProductDisplay, here I call on the ProductDisplay. It works. However, when I use my ProductSlider, which is also lazy hydrated, its child components (ProductDisplay) will not get rendered properly.

maoberlehner commented 4 years ago

I don't think it is a good practice to nest <LazyHydrate>. But apart from that: Please provide an easy way to reproduce the problem or otherwise I can't help you.

maoberlehner commented 3 years ago

Close because of inactivity.