You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m sorry I have no time to actually test this, but I wanted to leave at least a note.
There are complex React components that expect functions as children. Those functions will be later called and of course they expect React elements to come out of those.
This means that your synchronous incremental-dom → React element transformation would happen just for the “first level” and not for the results of those functions.
Thanks for bringing this up, I really didn't know about this use case but now I see that components like react-motion use it.
We actually currently don't even allow passing functions as children, so right now we'd probably simply ignore it completely without passing it down. But I see that even if we already accepted functions we'd have the problem you've mentioned.
I think it's possible to fix this inside metal-react though. When converting children we can wrap these functions into another that can transform the results into react elements too.
This requires enabling functions to be passed as children first, so I'll try to take care of both of these :)
I’m sorry I have no time to actually test this, but I wanted to leave at least a note.
There are complex React components that expect functions as children. Those functions will be later called and of course they expect React elements to come out of those.
This means that your synchronous
incremental-dom → React element
transformation would happen just for the “first level” and not for the results of those functions.The text was updated successfully, but these errors were encountered: