karet icon indicating copy to clipboard operation
karet copied to clipboard

Consider supporting `React.cloneElement`

Open polytypic opened this issue 8 years ago • 1 comments
trafficstars

Karet currently only replaces the React.createElement function. If you use React.cloneElement to clone an element without observables in such a way that the new clone has observables in it, then the resulting element currently will not be lifted.

polytypic avatar Apr 12 '17 15:04 polytypic

Hmm... I've never used React.cloneElement and I can't think of convincing use cases for it—although that doesn't mean that there wouldn't be any. So, I'm happy to reconsider, assuming someone presents really good use cases for it, but otherwise I will likely not implement this. Assuming React.cloneElement can be supported in such a fashion that it can be dead code eliminated (that should be the case) when not used, then a PR is welcome!

polytypic avatar Apr 15 '18 00:04 polytypic