dscript-deku

dscript with Deku setup done for you

Usage no npm install needed!

<script type="module">
  import dscriptDeku from 'https://cdn.skypack.dev/dscript-deku';
</script>

README

dscript-deku

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

dscript with Deku setup done for you

Check out dscript for documentation on more advanced usage.

Install

npm install --save dscript-deku

Usage

import creator, {div, li, ul} from 'dscript-deku'

import customComponent from './custom-component'

const customComponentCreator = creator(customComponent)

const handleClick = () => alert('hi')

export default ({props}) =>
  div('.list-container', {onClick: handleClick}, [
    customComponentCreator({total: props.total}),
    ul(
      props.items.map(item =>
        li([item.name])
      )
    )
  ])

LICENSE

MIT © Dustin Specker