Skip to content

Commit 5a04bb5

Browse files
authored
docs(readme): fix the hydrateWhenTriggered example
1 parent e975c9a commit 5a04bb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,18 +442,18 @@ Wrap a component in a renderless component that will be hydrated when the `trigg
442442
<script setup>
443443
import { ref, resolveComponent } from 'vue';
444444
445-
import { hydrateOnInteraction } from 'vue3-lazy-hydration';
445+
import { hydrateWhenTriggered } from 'vue3-lazy-hydration';
446446
447447
const hydrationTriggered = ref(false);
448448
449449
// wrap a globally registered component resolved by its name
450-
const LazilyHydratedComp = hydrateOnInteraction(
450+
const LazilyHydratedComp = hydrateWhenTriggered(
451451
resolveComponent('ComponentA'),
452452
hydrationTriggered
453453
);
454454
455455
// wrap an asynchronously loaded component
456-
const LazilyHydratedAsyncComp = hydrateOnInteraction(
456+
const LazilyHydratedAsyncComp = hydrateWhenTriggered(
457457
() => import('./ComponentB.vue'),
458458
hydrationTriggered
459459
);

0 commit comments

Comments
 (0)