Alex, I feel like your ideas in this article make perfect sense and it seems like an evolution from Ryan Florence ones (https://gist.github.com/ryanflorence/daafb1e3cb8ad740b346#how-it-works)
However, there’s a contradiction that I feel like it should be solved. One of your rules is:
Nested entities can only use other entities that are defined by a parent entity.
But then, when you are talking about components:
if you decide to define a new component inside another component (nesting), this new component can only be used by an entity that is a parent
I feel like this last sentence is clearly breaking the previous rule, since a parent entity is using a child entity, but it should “ONLY use other entities that are defined by a parent entity”.
So maybe a solution to this issue would be to embrace React composition nature, and make component nesting to be all about specificity of a component. In this scenario, Alert is a component, and a child of it could be ModalAlert, which internally uses Alert. In that way, the rule would still be intact and the contradiction is gone. What do you think?