Closed adrianoresende closed 5 years ago
Hello! Thank you for submitting a bug report. Please add a reproduction link on CodeSandbox or something similar. Thx!
Generally speaking, unfortunately, if you're using a system which uses the Vue template renderer in the background, components are loaded even though they are not visible (but they're still not hydrated / executed). There is a feature request open in the Vue.js repository which might make it possible to change this: https://github.com/vuejs/vue/issues/9847
@maoberlehner https://codesandbox.io/s/6yq314kkp3
Thank you for taking the time to create a CodeSandbox.
This package is not intended to be used with purely client side rendered applications: https://github.com/maoberlehner/vue-lazy-hydration#caveats-1 Please create a Nuxt.js or Gridsome (or similar) based CodeSandbox to replicate the error. Thx!
If you’re searching for a solution for client side rendered applications, you can read the following blog post of mine: https://markus.oberlehner.net/blog/lazy-load-vue-components-when-they-become-visible/
The component is loaded even when it was not visible
Code live: https://codesandbox.io/s/6yq314kkp3