[FEAT]: Migrate template refs to use 'useTemplateRef'
Closed this issue · 2 comments
snepsnepy commented
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:
Validations
- I have checked other issues to see if my issue was already discussed or addressed
DavidHDev commented
Sounds good!