How do you allow consumers to pass functions into components? #1622
Replies: 1 comment
-
This might be better suited as an issue. If you could create one with the proper reproduction steps, we can then investigate a possible fix. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I have a Button component and want to let the consumer pass in an
onClick
handler, I run into trouble like this:But when I try to use this with Qwik, it wants the
$
at the end ofonClick
. The Qwik component from Mitosis is set toonClick$
, but if I check props, it's looking foronClick
and fails when it's undefined. If I checkprops.onClick$
it'll work, but then the React consumer would also have to pass its handler asonClick$
which isn't a thing you'd do in React and I'm not sure it would even work.The docs gives no guidance on this.
Mitosis gets pitched as a solution for building design systems but it can't handle children types, function props, or
...rest
spreads.Beta Was this translation helpful? Give feedback.
All reactions