# useTemplateRefsList

Shorthand for binding refs to template elements and components inside .

**Package:** `@vueuse/core`
**Category:** Component

## Usage

```ts
<script setup lang="ts">
import { useTemplateRefsList } from '@vueuse/core'
import { onUpdated } from 'vue'

const refs = useTemplateRefsList<HTMLDivElement>()

onUpdated(() => {
  console.log(refs)
})
</script>

<template>
  <div v-for="i of 5" :key="i" :ref="refs.set" />
</template>
```

## Reference

[VueUse Docs](https://vueuse.org/core/useTemplateRefsList/)
