Closed IamCarbonMan closed 8 years ago
This is being discussed as part of Blaze itself: https://github.com/meteor/blaze/issues/94
The plan is to have:
<template name="foo">
<!-- some HTML here -->
</template>
<script>
class FooComponent extends BlazeComponent {
template () {
return "foo";
}
// some JS here
}
</script>
So I will be closing this in favor of that.
Right now I have something like the following:
I'd rather write it like this:
The ability to combine the HTML and JS of a single component in the same place like this is one of the major strengths of JSX and I'm sure would be appreciated by anybody Blaze Components. Perhaps add a Meteor build plugin that just splits the HTML out of BlazeComponents' template attribute and puts it into an HTML file, adding an import in the original JS file?