dominant icon indicating copy to clipboard operation
dominant copied to clipboard

Refactor: Extract a minimum implementation with no prop-specific handlers

Open guiprav opened this issue 4 years ago • 0 comments

Binding.specialUpdateFnsByKey was a nice first step towards modular handling of special props like class/style/value, but d.el still contains hardcoded handling for those. A logical next step would be to separate those into their own functions and build something similar to Binding.specialUpdateFnsByKey for those as well, so their behavior can also be overridden or extended without patching Dominant's source code itself.

Might even be able to keep separate prop handler npm packages for each prop. Even if special prop handlers for class/style/value are unavoidable in a web environment, it seems that keeping them separate might add very minimal complexity to the implementation code itself. I should validate this before actually breaking everything up though.

Still, separating them internally and allowing overriding/extension by project seems like an important thing to have, if possible.

guiprav avatar Jul 18 '21 11:07 guiprav