Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: HTMLComponent – Component-Based UIs Using Only ES6 and Custom Elements (github.com/felipeccastro)
27 points by felipeccastro on Nov 3, 2016 | hide | past | favorite | 4 comments


It'd be nice to not have a set() method, but instead use property accessors. That way data-binding frameworks like set properties will just work.


Yes, that would make a slightly better syntax. However, using the .set() method has an advantage of letting you pass all attributes in a single hash, and re-rendering only once at the end. It's a trade off, I think.


Nice, looks a lot like Riot.js


Thanks! The single file component format is becoming increasingly popular (for good reason), being used on Riot, Vue, Polymer and probably others. The main difference, however, is in HTMLComponent the goal is to use native functionalities as much as possible, so any code you write is based on web standards, not framework specific. Also, unlike most frameworks (including Riot), there is no support for data binding, and direct DOM manipulation is the expected usage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: