marko-widgets
Version:
Module to support binding of behavior to rendered UI components rendered on the server or client
21 lines (19 loc) • 514 B
JavaScript
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getInitialState:function(input){
return {
name: input.name,
count: input.count,
className: input['class']
};
},
getTemplateData:function(state, input){
return {
name: state.name,
count: state.count,
foo: 'bar',
hello: 'world',
className: state.className
};
}
});