With the imports it's a slightly different paradigm – in the way that you put it, Skate is more similar to React's approach where the template is embedded in the source.
With the imports it's a slightly different paradigm – in the way that you put it, Skate is more similar to React's approach where the template is embedded in the source.
It's not immediately obvious, but you could create a custom element with Skate that takes it's content and creates a new custom element definition from it, similar to how Polymer 1 worked. This approach was discussed as being implemented in custom elements v2, but is closed to see what frameworks come up with: https://github.com/w3c/webcomponents/issues/136. This is totally something that could be done with Skate, though.
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!.