morphdom-hooks
Lifecycle hooks for morphdom
example
const hooks = const morphdom = // create a button with some lifecycle handlers attached to it { const b = document bonadd = consolelog bonupdate = consolelog bondiscard = consolelog return b} const div0 = documentdocumentbody const div1 = documentconst button0 = div1// logs 'button added to page!' const div2 = documentconst button1 = button1stylecolor = 'red'div2// logs 'button updated in page!' const div3 = document// logs 'button discarded from page!'