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
Is it possible to change the return type of func If(cond bool, children ...ComponentOrHTML) MarkupOrChild to List?
func If(cond bool, children ...ComponentOrHTML) MarkupOrChild
List
This is my use case:
type CustomComponent struct { vecty.Core Content vecty.List `vecty:"prop"` } func NewCustomComponent(content ...vecty.ComponentOrHTML) *CustomComponent { return &CustomComponent {Content: content} } func (ch *CustomComponent) Render() vecty.ComponentOrHTML { return elem.Div( ch.Content ) } --- type View struct { vecty.Core Flag bool } func (ch *View) Render() vecty.ComponentOrHTML { return NewCustomComponent( vecty.If(ch.Flag, elem.Div()) // will not compile ) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is it possible to change the return type of
func If(cond bool, children ...ComponentOrHTML) MarkupOrChild
toList
?This is my use case:
The text was updated successfully, but these errors were encountered: