Check out dscript for documentation on more advanced usage.
For usage with React v15.0
:
npm install --save dscript-react
Note: React v0.14
users should install via npm install --save dscript-react@1.0.0
import creator, {div, li, ul} from 'dscript-react'
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])
)
)
])
MIT © Dustin Specker