It's interesting to see a somewhat widespread shift away from the separation of code, templates, styles, and text model of publishing things (mostly websites, but most publishing can be boiled down to that if you squint), where code/templates/style get merged into one. React does this. Pollen seemingly takes it even further and sticks the text in the code, too. Or, rather sticks the code in the text, I guess. It's a…
When I learned HTML in the 90's and early 2000's you got a strong notion that they were separate concerns. When I was learning react when it came out I had such a visceral reaction I just wanted to run away. After coding within react for the past couple years I strongly feel that react has got it right. A concern is after all a generality that has the potential to generate a strong bias. My lesson is that concerns sh…
ie css, html and javascript for that page contained within that page.
Then, as you notice common use cases accross pages start to abstract them to a central library (be it js, css).
This way it makes it easy to develop any size application because each page is coded as needed and code relevant to each page is always right there with it.
I've worked on plenty of codebases that start out with a central library and then build outward but they always seem harder to maintain due multiple layers of abstraction.
I guess, in summary, this method is a way to lazy load abstraction.