-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
docs: Inline method components #561
Comments
Hi there thank you for the report. In-fact this syntax is already supported. Perhaps if you have time you might like to add an example to the docs please? https://templ.guide/core-concepts/components/#method-components |
@Ra0k What version are you running of templ? Try installing the mainline version of the cli, the parsing has been improved: |
Thank you, @joerdav! I haven't realized that it's now supported in the new version! I can confirm that it indeed works. |
The language supports method components like this:
Would it be possible to add support for this kind of syntax?
Sorry, if it is already supported, I did not find anything about the specific syntax in the documentation nor a working example.
This syntax could be a cleaner way of configuring renderable components than passing config arguments to functions.
The text was updated successfully, but these errors were encountered: