vue-lazy-hydration icon indicating copy to clipboard operation
vue-lazy-hydration copied to clipboard

Conditional lazy hydration

Open simplenotezy opened this issue 5 years ago • 2 comments
trafficstars

It would be cool if you could have a parameter to set if you want to "disable" lazy hydration. E.g.:

<LazyHydrate :enabled="false">

I work with dynamic user defined components, and sometimes I'd like to disable LazyHydrate if a certain condition is met (e.g. "disable_lazy_load").

simplenotezy avatar Apr 27 '20 13:04 simplenotezy

Not exactly what you want but as a workaround you can use triggerHydration.

<LazyHydrate when-visible trigger-hydration="disable_lazy_load">
  <!-- ... -->
</LazyHydrate>

maoberlehner avatar Apr 27 '20 14:04 maoberlehner

Can you elaborate a bit on this @maoberlehner? Would this allow me to manually trigger a hydration? E.g. I could use "on-interaction" and then also have a trigger-hydration that would trigger once the element is visible? Or some other condition.

simplenotezy avatar Sep 12 '20 18:09 simplenotezy