A Girl and Her ViewBuilder(cuteios.dev)
cuteios.dev
A Girl and Her ViewBuilder
https://cuteios.dev/2024/01/10/viewbuilder.html
6 comments
Didn't really do anything for me neither helping to understand the subject nor the style of it. Rather the opposite I am now less likely to try it.
I quite like this style of blog entry, it flows well once you get used to the structure.
You know, I never really understood why ViewModifier exists at all. How is it different from an extension on View?
A viewmodifier can have its own @State, etc. I can’t think of anything that couldn’t be accomplished with an extension on View with a few tricks but ViewModifiers are easier & cleaner IMO. I usually have a ViewModifier along with an extension on view used to apply it
This all reminds me of WebSharper, so cool but DSLs for this have been around for over a decade.