You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the props that are passed to a component are available through $$props, but there isn't a great way to access the "unknown" (non-exported) props. Having the ability to access these props would make it more convenient to forward attributes down to a native DOM element.
Currently, my workaround is to destructure $$props with every known prop name.
I used $$attrs since Vue has an $attrs property (based on its inheritedAttrs), but I'd happily type $$theseAreTheUnexportedProps if it saved me from doing the destructuring myself.
If this isn't ideal default behavior, maybe it could be controlled with an option?
<svelte:optionsinherit={true}/>
The text was updated successfully, but these errors were encountered:
All of the props that are passed to a component are available through
$$props
, but there isn't a great way to access the "unknown" (non-exported) props. Having the ability to access these props would make it more convenient to forward attributes down to a native DOM element.Currently, my workaround is to destructure
$$props
with every known prop name.My ideal use would look more like:
I used
$$attrs
since Vue has an$attrs
property (based on itsinheritedAttrs
), but I'd happily type$$theseAreTheUnexportedProps
if it saved me from doing the destructuring myself.If this isn't ideal default behavior, maybe it could be controlled with an option?
The text was updated successfully, but these errors were encountered: