anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.42k stars 131 forks source link

Component's type is an object rather than a string when not using jsx #238

Closed kvnneff closed 9 years ago

kvnneff commented 9 years ago
import dom from 'dekujs/virtual-element'

let Form = dom('form', {}, [])

export function render () {
  return dom(Form, {}, [])
}

The above will return a vnode with type as an object: { attributes: Object, children: Array[0], type: Object }

The type object looks like: {propTypes: {transform: {type: function}}}

I believe type should equal form. Am I using components incorrectly?

kvnneff commented 9 years ago

I was misunderstanding the API. Closing this.