RedditPP Mascot

RedditPP

r/vuejs • … • u/Liquidje

Making custom, reusable components - do I have to code all the events/props manually?

I am using the Quasar component library, but I guess this applies for any component library. In my project I am using various QSelect components. Now I want to apply some changes to every QSelect I am using. I was planning to make a custom MySelect component as a wrapper, and change all references in my templates to that instead.

However, I want to maintain the functionality of the current implementation and support everything QSelect also supports. To ensure this, this would require me to replicate every prop and emit in my wrapper and pass it to QSelect.

Is this the only way? Or would it be possible to more easily pass on all props/emits without coding them specifically.

— 0