React-style components without JSX or a compile step. aka a runtime React. Don't use :) this is an unfinished experiment.
import { render, html } from 'cork'
const Title = props => html`<div>${props.children}</div>`
const Button = props => {
return html`
<button onclick="${e => console.log('hi native events')}">
${props.children}
</button>
`
}
const App = props => {
return html`
<>
<Title>:)</Title>
<Button>Press me</Button>
</>
`(Title, Button)
}
render(html`<App/>`(App), document.getElementById('app'))
For fun.