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
For the bug portion, I would expect $$props['some-input'] in Svelte to be translated into props['some-input'] in React.
Ideally, there would also be a way to provide destructured props to child elements. When working with wrappers for dom elements, it's a hugely bad use case to need to specify every dom attribute that might be used (especially in the case of UI libraries).
Minimally, it would be nice if {...$$props} would translate to {...props}. Redundant, or unwanted, props could then be overridden with more specific behavior. The ideal long-term would be to allow for destructured use of $$restProps but I know that's a bigger ask, since props aren't destructured at all within the generated code
Actual Behaviour
In React specifically, $$props['some-input'] is not converted and is provided as $$props['some-input'] to the child.
Across all generators, {...$$props} and {...$$restProps} are removed entirely from the response.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
I am interested in helping provide a fix!
Yes
Which generators are impacted?
Reproduction case
https://mitosis.builder.io/?outputTab=E4UwhgxgLkA%3D&inputTab=M4NwpgNgLmQ%3D&code=DwZwxgTglgDgLgAgDYEMB2BzAvAIjiHAPgCgEEBTADxgHsJElzEwak6EsEByLgbmOAB6cNHgkBAIwCucODTSkEAbwB0agCTqI5EHAAKEGjBABfRao3qYh42bIpoKALQALKABN35NFiWbrRiAA2lwOUM5unt5cALp2CPIAXGBIUGAA1sQkZKBscIQAwqkZCC7k2kIgeSRC0rLyJEA
Expected Behaviour
For the bug portion, I would expect
$$props['some-input']
in Svelte to be translated intoprops['some-input']
in React.Ideally, there would also be a way to provide destructured props to child elements. When working with wrappers for dom elements, it's a hugely bad use case to need to specify every dom attribute that might be used (especially in the case of UI libraries).
Minimally, it would be nice if
{...$$props}
would translate to{...props}
. Redundant, or unwanted, props could then be overridden with more specific behavior. The ideal long-term would be to allow for destructured use of$$restProps
but I know that's a bigger ask, since props aren't destructured at all within the generated codeActual Behaviour
In React specifically,
$$props['some-input']
is not converted and is provided as$$props['some-input']
to the child.Across all generators,
{...$$props}
and{...$$restProps}
are removed entirely from the response.Additional Information
No response
The text was updated successfully, but these errors were encountered: