v2.0.0
Note
Nuxt v3.18 and Nuxt v4 support lazy hydration macros (nuxt/nuxt#31192)! These provide a more ergonomic way to control component hydration and I recommend to migrate to them:
<script setup lang="ts">
const LazyHydrationMyComponent = defineLazyHydrationComponent(
'visible',
() => import('./components/MyComponent.vue')
)
</script>
<template>
<div>
<!--
Hydration will be triggered when
the element(s) is 100px away from entering the viewport.
-->
<LazyHydrationMyComponent :hydrate-on-visible="{ rootMargin: '100px' }" />
</div>
</template>These macros make it possible to use Nuxt's lazy hydration utilities alongside explicit component imports.
聽聽聽馃毃 Breaking Changes
- Remove
DelayHydrationcomponent in favor of Nuxt built-ins 聽-聽 by @johannschopplich (0524f)