Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/docs/src/en/magics/refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,19 @@ title: refs
<!-- END_VERBATIM -->

Now, when the `<button>` is pressed, the `<span>` will be removed.

<a name="limitations"></a>
### Limitations

In V2 it was possible to bind `$refs` to elements dynamically, like seen below:

```alpine
<template x-for="item in items" :key="item.id" >
<div :x-ref="item.name">
some content ...
</div>
</template>
```

However, in Alpine V3 you can only access `$refs` for elements created statically. For the example above, the `$refs` would not contain `item.name`.