I really like the `Modifier` system and I use it a...
# kobweb
n
I really like the
Modifier
system and I use it almost always. I started to write trivial utility functions for HTML tags like:
Copy code
@Composable
fun Div(
    modifier: Modifier,
    content: ContentBuilder<HTMLDivElement>? = null
) =
    Div(modifier.toAttrs(), content)
It doesn't seem like a big deal as I spare only one
.toAttrs()
in each call (of course only if I don't need the
.toAttrs {}
variant). But as I started to use them, it seems that this small decrement of "boilerplate" counts, too πŸ™‚ My question is: is there a "deeper" reason why Kobweb does not provide such utility functions (that I might not have thought of for some reason), or are these just simply not implemented? Thanks.
d
It's a philosophical question for sure! And just because I went one way doesn't mean it was the right call, or maybe it will be the right call for 1.0 but not 2.0
πŸ‘πŸ» 1
At its heart, Kobweb is not supposed to replace Compose HTML, it's supposed to feel like a comforting level of additional functionality built on top of it
πŸ‘πŸ» 1
In other words, I want people to still use Compose HTML if it's available! That wasn't the problem I was trying to solve.
πŸ™ 1
(And finally, but perhaps secretly most importantly, Kobweb's surface area is already gigantic, so committing to covering even more of it is scary πŸ™‚ )
πŸ˜„ 1
I'm very happy you're writing those utility methods yourself btw. I think that's a great compromise at the moment.
πŸ‘πŸ» 1
n
Thanks πŸ™‚