We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
children
When authoring a component and using the {children} reserved name, it would be nice to have this prop extracted from $props() automatically.
{children}
$props()
As you author the body of a component:
<button>{children}</button> <!-- ^ cursor is here after typing `c` -->
An autocomplete suggestion appears to extract children from $props(). Upon hitting ENTER, the autocomplete provides the prop and @render syntax:
@render
<script> let { children } = $props() </script> <button>{@render children()}</button>
And if other props are already destructured, it will intelligently append children to the list of destructured props.
No response
Relates to #2499.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When authoring a component and using the
{children}
reserved name, it would be nice to have this prop extracted from$props()
automatically.Proposed solution
As you author the body of a component:
An autocomplete suggestion appears to extract
children
from$props()
. Upon hitting ENTER, the autocomplete provides the prop and@render
syntax:And if other props are already destructured, it will intelligently append
children
to the list of destructured props.Alternatives
No response
Additional Information, eg. Screenshots
Relates to #2499.
The text was updated successfully, but these errors were encountered: