diff --git a/lib/component/instance.js b/lib/component/instance.js index 23be657..891c200 100644 --- a/lib/component/instance.js +++ b/lib/component/instance.js @@ -6,13 +6,12 @@ module.exports = function instanceComponent(patch, container, factory, userProps const render = createRenderer(patch, container); let props = userProps; let children = []; - let vnode; let userView; let store; const emitter = mitt(); emitter.on('render', () => { - vnode = render({ usePatch: true, view, state, props, children }); + render({ usePatch: true, view, state, props, children }); }); const instance = factory({ emitter, props }); @@ -32,14 +31,10 @@ module.exports = function instanceComponent(patch, container, factory, userProps if (typeof state !== 'object') throw new Error('Store function in your components should return an state object'); return { - vnode() { - return vnode; - }, render({ usePatch = false, props: userProps = {}, children: userChildren = [] }) { props = userProps; children = userChildren; - vnode = render({ usePatch, view, state, props, children }); - return vnode; + return render({ usePatch, view, state, props, children }); }, state, props,