-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
From this.afterRender():
This method needs to be called when returning a constructed virtual tree.
If the method is mandatory, wouldn't it make sense to always run it internally? What are the use cases for not running this method?
const baseElement = require('base-element')
const html = require('virtual-dom')
const el = baseElement()
// I would prefer this:
el.render(data => html(`<div></div>`))
// over always typing this:
el.render(data => this.afterRender(html(`<div></div>`)))I'm not sure how the internals are laid out, but passed in function is being bound it might simplify the code and possibly make the interface more resilient. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels