DEV Community

Discussion on: The HTML Component Pattern HCP

Collapse
 
isaachagoel profile image
Isaac Hagoel

I used similar approaches when creating vanilla components in the past, when the App needed to support browsers that didn't have customElements.define(...) :)
This is a nice start but I think there is still a lot missing.
One thing you might want to add are ways to easily put your components in templates, find them in the DOM, call DOM operations on them (as in myComponent.addEventListener) and so on.
On top of that there are the problems that modern frameworks are trying to solve regarding auto refreshing your views as your 'state' changes in a performant manner.

Collapse
 
frankdspeed profile image
Frank Lemanschik

nice to hear that from you and yes there is more stuff to solve and there are a lot of ways to solve them. The view part ist interristing i will keep you updated because i solve that via Streams to compose Observeable State for DOM Updates.