News for hackers. Stuff that matters.
Re:Show HN: Web-directive.js – A directive pattern for nativ... by jauntywundrkind on Sunday October 19, 2025 @02:05PM (#45636408)
Similar but different, I really dig the nice spatial/3d webcomponent https://Lume.io 's ECS / behavior system. Standalone library, works for anything. https://github.com/lume/element-behaviors

Here, the presence of an attribute signals behavior. With element-behaviors, has= attribute is used to say what behavior classes to apply. Different paths but doesn't seem super dissimilar end result. I feel like web-directive giving a simple callback leaves a lot to the developer, where-as element-behaviors API surface tries to parallel WebComponents, which is familiar & has lots of nice understandable lifecycle builtin.

There are no comments on this comment yet.