Hacker News new | ask | show | jobs
by noir_lord 3520 days ago
This looks interesting.

I'm currently using the component support in Knockout which looks pretty similar in function.

    ko.components.register('my-widget', {
        viewModel: require('../../components/my-widget/my-widget'),
        template: require('fs').readFileSync(__dirname + '/../../components/my-widget/my-widget.html', 'utf8')
    });
This then allows me to use <my-widget></my-widget> in the HTML, params can be passed down with params="{someObject}".

It's a very different way of building applications but I like it, makes for clean markup and seperation of concerns.

I generally like the approach but long term I'm not sure about the future of KO, this looks like it offers very similar functionality in a more compatible way, also I love your documentation, it's thorough and clear!.