add optional default props to factory
ungoldman opened this issue · 1 comments
ungoldman commented
var x = require('hyperaxe')
var textInput = x('input', { type: 'text' })
textInput({ value: 'foo' })
// => <input type="text" value="foo" />
textInput({ type: 'email', value: 'foo' })
// => <input type="email" value="foo" />
ungoldman commented
could go one further and allow object as first param too
var x = require('hyperaxe')
var textInput = x({ tag: 'input', type: 'text' })
textInput({ value: 'foo' })
// => <input type="text" value="foo" />