A 1 KB virtual DOM library with focus on minimalism and user friendliness.
at github.com▼22 up and 0 down, posted by
22 up and 0 down, posted by
Pretty cool, but wonder how it handles synthetic events compared to react... It seems to me synthetic events and supported nodes should be as close to react as possible. I'm also curious if this supports svg and associated elements as well.
If there are no direct references to a particular DOM node elsewhere in your code, then the DOM node will be GC'ed after they are detached from the tree using removeChild. Also, picodom _does not_ use addEventListener/removeEventListener, instead it sets the function on the element like this: element.onclick = data.onclick Because picodom manages its own nodes and they are created declaratively by the user (as opposed to imperatively) there is no scenario where you could have multiple event handlers of a single event attached to a DOM node, unless you use a lifecycle event to access a DOM node and use addEventListener yourself on it, but then that's your problem. So, tl;dr it's fine.