DavidHDev/vue-bits

[FEAT]: Use 'defineModel' for simpler v-model support in components

Closed this issue ยท 5 comments

Share your suggestion

Hey!

While I was looking on how "PreviewColor" component is implemented, I noticed it uses the tranditional modelValue/update:modelValue pattern.

I'd like to suggest updating the library to use the new 'defineModel' macro for v-model support. This change can make the codebase cleaner and simplify the pattern mentioned above.

Please let me know what do you think. Thanks!

Validations

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

Hey! I'm honestly not that well-versed in Vue 3 best practices having worked with React most of my career, but that sounds like a good suggestion!

If you want to give it a shot and update it, go ahead. As long as the look and feel of the website is not affected, I'm completely fine with it.

Makes sense, no worries! I'm not a guru either but I've worked more with Vue and seen some things along the way.

I'll take care of it, thanks for the reply!

Should I do this update for all the component where required or do we want to tackle this in different PRs?

@snepsnepy It can be done project-wide where it makes sense, I think it's faster ๐Ÿ‘

Merged in #28

This should be enforced from now on, so if anyone finds inconsistencies in any future PR, make sure to point that out!