There are some really neat ideas in here. I love the simplicity of declaring a template that gets automatically upgraded to a WebComponent.
It would be nice if there was a documented pattern for adding extra JavaScript behaviour to one of these components without needing to save it in a separate file with a matching name - I often like to prototype small ideas with ALL of the code in a single HTML file with inline JavaScript.
Manually rendering state instead of having it automatically synced from tracked variables is a pain. This isn’t automating the part of vanilla JS that I don’t like.
Thanks for reaching out, I agree and boreDOM automatically renderes and syncs state, it proxies the state and keeps track of which attributes are being needed by which components at each render. It is a simple approach but works as fine-grained auto-updates as much as possible (however arrays do get updated as a whole, for now I guess).
There are some really neat ideas in here. I love the simplicity of declaring a template that gets automatically upgraded to a WebComponent.
It would be nice if there was a documented pattern for adding extra JavaScript behaviour to one of these components without needing to save it in a separate file with a matching name - I often like to prototype small ideas with ALL of the code in a single HTML file with inline JavaScript.
You might like Facet.
Oh cool! Pretty much the same pattern.
Thanks! this is a really cool idea, I’ve just added support for it and a todo list example as well: https://github.com/HugoDaniel/boreDOM/blob/main/examples/todo-list/todo.html
Manually rendering state instead of having it automatically synced from tracked variables is a pain. This isn’t automating the part of vanilla JS that I don’t like.
Thanks for reaching out, I agree and boreDOM automatically renderes and syncs state, it proxies the state and keeps track of which attributes are being needed by which components at each render. It is a simple approach but works as fine-grained auto-updates as much as possible (however arrays do get updated as a whole, for now I guess).
Checkout the examples https://github.com/HugoDaniel/boreDOM/tree/main/examples