Skip to content

[FEAT]: Migrate template refs to use 'useTemplateRef' #31

@snepsnepy

Description

@snepsnepy

Share your suggestion

Hey! 😄

I'd like to propose to migrate the existing template references from the legacy 'ref<HTMLElement | null>(null)' pattern to Vue 3.5 'useTemplateRef' API.

This approach represents the framework's official direction for template references management and it has a couple of benefits like:

  • Enhanced type safety by eliminating nullable type annotations, since Vue will handle the initalization
  • Provides explicit naming conventions
  • Reduces boilerplate code and potential null reference errors

You can find more info down below:

useTemplateRef()

Validations

  • I have checked other issues to see if my issue was already discussed or addressed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions