hyperscript icon indicating copy to clipboard operation
hyperscript copied to clipboard

Any TypeScript examples?

Open balupton opened this issue 6 years ago • 1 comments

balupton avatar May 05 '19 16:05 balupton

I'm currently this far:

yarn add hyperscript @types/hyperscript
import h from 'hyperscript'

const d = h('div', 'hi', {
    styles: {
        backgroundColor: 'black',
        color: 'white'
    }
})

document.body.appendChild(d)

Though in Angular it asks me to use because of the ESModuleInterop feature

import * as h from 'hyperscript'

alshdavid avatar Jun 15 '19 02:06 alshdavid