const html = require('choo/html'); const Component = require('choo/component'); const Account = require('./account'); class Header extends Component { constructor(name, state, emit) { super(name); this.state = state; this.emit = emit; this.account = state.cache(Account, 'account'); } update() { this.account.render(); return false; } createElement() { return html`
${this.account.render()}
`; } } module.exports = Header;