Lazy hydration for Vue SSR.
NOTE: This project uses @znck/prop-types which generates tree shakeable component prop definitions but it requires
process.env.NODE_ENVto replaced with
"production"to work effectively. See @znck/prop-types's documentation to know more.
npm install --save lazy-hydration
Examples of using Hydrate in a Vue component, which also documents the different options provided:
<!-- Hydrate when user clicks. --><!-- Just in time hydration. When user hovers over content -->...<!-- Hydrate on any event -->...<!-- or events -->...<!-- When user hover over or keyboard focus into. -->...<!-- Requires IntersectionObserver. Polyfill not included. -->...<!-- Requires requestIdleCallback. Polyfill not included. -->...<!-- Only in SSR. -->...<!-- Scheduled hydration. In 2s of initial render. -->...<!-- Controlled hydration -->...
NOTE: Consider BETA until v1.0 release.
- vue-lazy-hydration by Markus Oberlehner
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.