"For state-less components we can use functions as UI components (see “Elements” page).",
" But in real life, we may need to handle the component live-cycle and provide",
" JavaScript the way to properly use the ",el("a",{textContent:"Garbage collection",href:"https://developer.mozilla.org/en-US/docs/Glossary/Garbage_collection",title:"Garbage collection | MDN"}),"."
"The text content of the paragraph is changing when the value of the observable ",el("code","textContent"),
" is changed. Internally, there is association between ",el("code","textContent")," and the paragraph",
" similar to using ",el("code","S.on(textContent, /* update the paragraph */)"),"."
),
el("p").append(
"This listener must be removed when the component is removed from the DOM. To do it, the library",
" assign internally ",el("code","on.disconnect(/* remove the listener */)(host())")," to the host element."
),
el("p",{className:"notice"}).append(
"The library DOM API and observables works ideally when used declaratively.",
" It means, you split your app logic into three parts as it was itroduced in ",el("a",{textContent:"Observables",href:"http://localhost:40911/docs/p04-observables#h-introducing-observables"}),"."