Skip to content

Commit

Permalink
removed unused vnode variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchoz49 committed Apr 26, 2017
1 parent bf55f83 commit f8d7221
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/component/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand All @@ -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,
Expand Down

0 comments on commit f8d7221

Please sign in to comment.