(since I have clipboard history, I decided to find a past clip that is actually interesting =P, herego:)
const { Component, h, render } = window.preact;
var FromCode = shortHand(`
-
function testing(str){
return str.toUpperCase();
}
div.app
header
h1 [App [Test].red].branded
h2 {testing(props.message)}
main(test={props.attr} more bare="wee")
ul
: props.items.map(i => <> )
li#{i} Item {i}
`);
function resultsIn(){
function anonymous(props
/*``*/) {
function testing(str){
return str.toUpperCase();
};
return h('div',{'class': `app`},[],[
h('header',{},[],[
h('h1',{},[
h('span', {'class': `branded`},[
`App `,
h('span', {'class': `red`},`Test`)
])
],[]),
h('h2',{},`${testing(props.message)}`,[])
]),
h('main',{'test': props.attr, 'more': `true`, 'bare': `wee`},[],[
h('ul',{},[],[
[1,2,3,4,5].map(i => [
h('li',{'id': i},`Item ${i}`,[])
] )
])
])
])
}
}