Type-safe templates with templ

templ compiles .templ files into Go functions, so a typo in a field name is a compile error, not a blank page in production. templ Hello(name string) { <p>Hello, { name }!</p> }…

templ compiles .templ files into Go functions, so a typo in a field name is a compile error, not a blank page in production.

templ Hello(name string) {
	<p>Hello, { name }!</p>
}

Run make generate (or go tool templ generate) after editing templates. make dev watches and regenerates for you.

0 comments