Skip to content

Commit

Permalink
feat: add component and node renderer and convert App to component
Browse files Browse the repository at this point in the history
  • Loading branch information
aibolik committed Jul 29, 2018
1 parent e53723c commit 87a1750
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ const render = (vnode, parent) => {
diff(undefined, vnode, parent)
}

render(h(App), document.querySelector('#root'))
render(h(App), document.querySelector('#root'))
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<body>
<div id="root"></div>

<div id="root"></div>

<script type="text/javascript" src="dist/bundle.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion v-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ export const diff = (dom, vnode, parent) => {
parent.appendChild(newDom)
return newDom
}
}
}
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
}
},
devtool: 'eval-source-map'
};

0 comments on commit 87a1750

Please sign in to comment.