Hydration Directives π
You can define which components should remain interactive in the production build by using client:
directives in your components.
Any JS required for these components will be automatically inferred and optimized to perform partial hydration in the final build.
You can use these directives inside your Vue components. In the following
example, the Download link is rendered statically, while the <Audio>
component is interactive and will be hydrated when visible.
The following hydration strategies are available:
client:load
Hydrates the component immediately as the page loads.
client:idle
Hydrate the component as soon as the main thread is free.
client:visible
Hydrates the component as soon as the element enters the viewport.
client:only
Does not prerender the component during build.
Prefer one of the previous strategies whenever possible.