Skip to content

Commit

Permalink
docs(readme): fix the hydrateWhenTriggered example
Browse files Browse the repository at this point in the history
  • Loading branch information
ram-you authored Jan 16, 2023
1 parent e975c9a commit 5a04bb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,18 +442,18 @@ Wrap a component in a renderless component that will be hydrated when the `trigg
<script setup>
import { ref, resolveComponent } from 'vue';
import { hydrateOnInteraction } from 'vue3-lazy-hydration';
import { hydrateWhenTriggered } from 'vue3-lazy-hydration';
const hydrationTriggered = ref(false);
// wrap a globally registered component resolved by its name
const LazilyHydratedComp = hydrateOnInteraction(
const LazilyHydratedComp = hydrateWhenTriggered(
resolveComponent('ComponentA'),
hydrationTriggered
);
// wrap an asynchronously loaded component
const LazilyHydratedAsyncComp = hydrateOnInteraction(
const LazilyHydratedAsyncComp = hydrateWhenTriggered(
() => import('./ComponentB.vue'),
hydrationTriggered
);
Expand Down

0 comments on commit 5a04bb5

Please sign in to comment.