-
-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
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
Setting children from go code #909
Comments
To pass children in code, you can use the ctx := templ.WithChildren(ctx, child)
err := Comp().Render(ctx, sb) The inverse (getting the children from within Go code) is done with the Lines 60 to 82 in e2511cd
There can only actually be one child. We haven't (currently) got an API to concatenate multiple templ components into a single component. The consensus is that adding That way, you could have |
I've updated the docs to include this information. Feel free to re-open etc. if needed. |
The title basically, e.g.:
The text was updated successfully, but these errors were encountered: