Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(no-unused-refs): support template ref api #2541

Merged
merged 5 commits into from
Sep 12, 2024
Merged

feat(no-unused-refs): support template ref api #2541

merged 5 commits into from
Sep 12, 2024

Conversation

KazariEX
Copy link
Contributor

@KazariEX KazariEX commented Sep 2, 2024

No description provided.

@FloEdelmann
Copy link
Member

Thanks! But can you please elaborate on the change? Where is useTemplateRef documented? Is it a native Vue feature?

@KazariEX
Copy link
Contributor Author

KazariEX commented Sep 2, 2024

It is a new feature of Vue 3.5 and there is no documentation yet.

https://github.com/vuejs/core/blob/main/packages/runtime-core/src/helpers/useTemplateRef.ts

lib/rules/no-unused-refs.js Outdated Show resolved Hide resolved
@KazariEX KazariEX requested a review from ota-meshi September 2, 2024 16:34
lib/rules/no-unused-refs.js Outdated Show resolved Hide resolved
Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine from my side 🙂

@FloEdelmann
Copy link
Member

FloEdelmann commented Sep 3, 2024

FYI: Vue 3.5 with useTemplateRef was released two days ago: https://blog.vuejs.org/posts/vue-3-5#usetemplateref

@s3xysteak
Copy link

Now it is the most recommended way to use template ref https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs. Hope it can be merged soon 😄 .

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ota-meshi ota-meshi merged commit c27837d into vuejs:master Sep 12, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useTemplateRef('*') "*" is defined as ref, but never used. => vue/no-unused-refs
4 participants