add virtual-dom boilerplate

This commit is contained in:
Feross Aboukhadijeh
2016-02-17 18:58:39 -08:00
parent c5c2be7519
commit d122ce9f36
5 changed files with 260 additions and 245 deletions

16
client/views/app.js Normal file
View File

@@ -0,0 +1,16 @@
module.exports = App
var h = require('virtual-dom/h')
function App (state) {
var count = state.count
return h('div', {
style: {
textAlign: 'center',
lineHeight: (100 + count) + 'px',
border: '1px solid red',
width: (100 + count) + 'px',
height: (100 + count) + 'px'
}
}, [ String(count) ])
}