Skip to content

Instantly share code, notes, and snippets.

@timwis
Created March 29, 2017 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timwis/fb5de5ba1a2702887dfb9b143976f6c5 to your computer and use it in GitHub Desktop.
Save timwis/fb5de5ba1a2702887dfb9b143976f6c5 to your computer and use it in GitHub Desktop.
const html = require('choo/html')
const component = require('nanocomponent')
const menu = require('../components/menu')
module.exports = function home (state, emit) {
return component({
render: (state, emit) => {
return html`
<body>
<h1>Hello, world</h1>
<div class="columns">
<div class="column is-one-quarter">
${menu(state.sheets, state.activeSheet)}
</div>
<div class="column">
Rows
</div>
</div>
</body>
`
},
onload: (el) => {
console.log('onload')
emit('sheets:getList')
}
})(state, emit)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment