Skip to content

Commit 3e97df0

Browse files
gantoineclaude
andcommitted
docs(v2): trim the useIsAlive header comment
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 3eb1993 commit 3e97df0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

  • frontend/src/v2/composables/useIsAlive

frontend/src/v2/composables/useIsAlive/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
// useIsAlive — tracks whether the owning effect scope is still active, so an
22
// async handler that resolves late can tell it's talking to a dead component.
3-
//
4-
// Replaces the manual pattern:
5-
// let unmounted = false;
6-
// onBeforeUnmount(() => { unmounted = true; });
7-
//
8-
// Cleanup uses `onScopeDispose` (not `onBeforeUnmount`) so it also works from
9-
// a non-component effect scope, e.g. inside another composable.
10-
//
11-
// Note: VueUse's `useMounted` is not a substitute — it only flips to `true` on
12-
// mount and never back to `false` on teardown.
133
import { onScopeDispose, shallowRef, type ShallowRef } from "vue";
144

155
export function useIsAlive(): ShallowRef<boolean> {

0 commit comments

Comments
 (0)