Why using shallowRef in documentation examples? #4757
-
<script setup lang="ts">
import { useIntersectionObserver } from '@vueuse/core'
import { shallowRef, useTemplateRef } from 'vue'
const target = useTemplateRef<HTMLDivElement>('target')
const targetIsVisible = shallowRef(false)
const { stop } = useIntersectionObserver(
target,
([entry], observerElement) => {
targetIsVisible.value = entry?.isIntersecting || false
},
)
</script>
<template>
<div ref="target">
<h1>Hello world</h1>
</div>
</template> for instance in here |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @araliakbari! I'm Dosu, here to help you solve bugs, answer questions, and guide you in becoming a contributor. I'll assist you while we wait for a human maintainer. What can I help you with today? For primitive values, there is no functional difference between using To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
Please refer to https://bsky.app/profile/antfu.me/post/3li4mhgkerc2a |
Beta Was this translation helpful? Give feedback.
Please refer to https://bsky.app/profile/antfu.me/post/3li4mhgkerc2a