maoberlehner / vue-lazy-hydration

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

How can I make it work with vue router? #54

Closed milewski closed 4 years ago

milewski commented 4 years ago

Hi I have an app that im manually SSR it using vue-server-renderer, Aparrently seems that this plugin doesnt work for any of the components that I have inside VueRouter ... take this as an example:

<template>

    <div class="main">

        <LazyHydrate> <!-- works --->
            <MenuBar/>
        </LazyHydrate>

        <RouterView/>

        <LazyHydrate> <!-- works --->
            <Footer/>
        </LazyHydrate>

    </div>

</template>

<template>

    <Page class="page-a">

        <template #body>

            <LazyHydrate> <!-- doesnt work --->
                <SomeComponent/>
            </LazyHydrate>

        </template>

    </Page>

</template>

Do you know what might be happening here? should it work normally with RouterView ?

milewski commented 4 years ago

never mind this was a mistake on my side.. it does works as expected