8 comments

[ 3.0 ms ] story [ 30.7 ms ] thread
This is really cool. I'll have to remember to try this. What I really like is that you can use it today.
Interesting.

It reminds a bit of the tag files of riot.js [1] Another possible approach (widely practiced today) is to have the children template extend the main template and override some blocks in the main template (you can do it with twig, blade etc). But even then, your templates could not be nested.

Nice concept!

[1] http://muut.com/riotjs

Thanks. It really looks a lot like React, RiotJS and WebCompoments (because they are all great) but it's on the server.
What is stopping from styles from one components overwriting styles from another components. So in isolation, as you say, components work fine, but after processing, will it not break?
In ASP.Net we call this user controls. We have this for like 15 years already.
Can you please give us an example user control where: 1. you've got CSS and JS code that goes in the head tag of the result document 2. you've got JS code that stays at the bottom of the body tag of the result document