How to write a passthrough wrapper component? #8508
Replies: 3 comments
-
|
I don't know if provide/inject can solve your problem. |
Beta Was this translation helpful? Give feedback.
-
|
See vuejs/rfcs#477. Discussion is welcome. |
Beta Was this translation helpful? Give feedback.
-
Update: solved via
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Due to microsoft/playwright#23435 & microsoft/playwright#23526, and tests that would be difficult doing with just Vitest/JSDOM. I'm trying to write a wrapper passthrough wrapper component to wrap the problem properties that I need to pass along.
But then that component doesn't have any types for it's props or emits, trying to define the props or emits as shown leads to props not being included in
$attrsand the same for the event handlers which don't seem to be accessible anymore.What's the proper way to write such a component without manually forwarding each prop and event by name?
Beta Was this translation helpful? Give feedback.
All reactions