karet
karet copied to clipboard
Consider supporting `React.cloneElement`
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.
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!