Matt-Esch / virtual-dom

A Virtual DOM and diffing algorithm
MIT License
11.65k stars 780 forks source link

About ev-* attributes #226

Open kuraga opened 9 years ago

kuraga commented 9 years ago

(as a continuation of #219)

Good day, @Matt-Esch !

Don't you think that's possible to remove suport of ev-* attributes at all, do you? Because:

Even if we remove it, it's simple to use:

But virtual-dom won't use so specific component. What do you think? Thanks.

Matt-Esch commented 9 years ago

Generally speaking I think virtual-hyperscript is both too big and too slow. I'm down for removing things like ev-click and other magical specifics if there is some clean way for mercury to customize virtual-hyperscript to actually provide this functionality.

Matt-Esch commented 9 years ago

@Raynos should be more concerned about back compat

Raynos commented 9 years ago

Multiple people have asked fore ways to customize virtual-hyperscript; we should look into those issues and look there; then fix mercury.

crabmusket commented 8 years ago

While this is in discussion, I wanted to throw in in the possibility of being able to customise virtual-hyperscript to have React-style control over when DOM elements are destroyed, as documented here. Particularly,

componentWillLeave(callback)

This is called when the child has been removed from the ReactTransitionGroup. Though the child has been removed, ReactTransitionGroup will keep it in the DOM until callback is called.

This appears to be useful for animations.