yew-fmt
yew-fmt copied to clipboard
[Discussion] How many braced variables should be put on one line?
It makes sense to say that
html! {
<Component>{ foo }</Component>
is formatted correctly.
However something like
html! {
<Component>
{ foo }
{ bar }
{ baz }
{ foobar }
</Component>
}
should maybe be kept that way even though it could possibly be merged onto one line.
I think there might be semantic meaning to the variables that would make you prefer splitting the lines (e.g. components into new lines, strings onto same line).
Would always splitting lines at two variables make sense?