Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional lazy hydration #47

Open
simplenotezy opened this issue Apr 27, 2020 · 2 comments
Open

Conditional lazy hydration #47

simplenotezy opened this issue Apr 27, 2020 · 2 comments
Assignees

Comments

@simplenotezy
Copy link

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").

@maoberlehner
Copy link
Owner

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

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

@simplenotezy
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants