Merge pull request #1517 from barneycarroll/object-create-component
Avoid intermediary component constructor
This commit is contained in:
commit
74ded82165
1 changed files with 1 additions and 6 deletions
|
|
@ -95,12 +95,7 @@ module.exports = function($window) {
|
|||
return element
|
||||
}
|
||||
function createComponent(vnode, hooks, ns) {
|
||||
// For object literals since `Vnode()` always sets the `state` field.
|
||||
if (!vnode.state) vnode.state = {}
|
||||
var constructor = function() {}
|
||||
constructor.prototype = vnode.tag
|
||||
vnode.state = new constructor
|
||||
|
||||
vnode.state = Object.create(vnode.tag)
|
||||
var view = vnode.tag.view
|
||||
if (view.reentrantLock != null) return $emptyFragment
|
||||
view.reentrantLock = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue