maoberlehner / vue-lazy-hydration

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

Support for dynamic components #42

Closed simplenotezy closed 3 years ago

simplenotezy commented 4 years ago

Would be great if this package supported dynamic components. Currently it does not seem to work.

maoberlehner commented 4 years ago
  1. If this is a feature request, please provide more details and a demo what you want to achieve.
  2. I'm pretty sure that this works. If you think this also could be a bug, please provide an easy way to reproduce.
simplenotezy commented 4 years ago

I'll provide an example later. But I have compnents like this:

<component :is="someName">

And that wouldn't render

Sent with GitHawk

Fifciu commented 4 years ago

@simplenotezy I had the same problem. I used hydrateWhenVisible function from Readme for components. It does not throw an error

simplenotezy commented 4 years ago

So no solution yet @Fifciu ?

Fifciu commented 4 years ago

As I said I've used hydrateWhenVisible in components as a workaround

lautr commented 4 years ago

It works for me, i had one odd case where a dynamic component would only contain another component, but after wrapping it in a div, it worked.

thats my working code -> https://pastebin.com/EDZp64XA

simplenotezy commented 3 years ago

Thanks - that seems to work @Fifciu