[Fabric] Don't pass instanceHandle to clones#13125
[Fabric] Don't pass instanceHandle to clones#13125sebmarkbage merged 1 commit intofacebook:masterfrom
Conversation
We will instead just reuse the first one.
|
OK. Can you explain more about how you plan to "reuse the first one"? |
|
See #13024 We use the canonical object to read the current props. |
|
Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired. Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status. |
|
Sorry. I should read. |
|
Well shoot, sorry for the noise. I missed the last line of your comment. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
@facebook-github-bot chill please |
|
I summoned the Kraken 😨 |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
4 similar comments
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
I changed my mind from #12824. We will instead just reuse the first one.
It turns out that this is kind of costly to do cross-VMs. Additionally, we can't really safely use this mechanism to extract the props since we pool the Fibers (so it's not safe to read from an old Fiber's memoizedProps to extract event listeners). To make it safe we'd also have to pass props which are immutable but then that is even more costly.
Finally, in the cases where this matters - async dispatching of events - it doesn't really matter which one we use since the async dispatching nature means that they have to be resilient regardless.
NOTE: We can't actually land this until the native changes has fully propagated everywhere.