[RN][Fabric] Most library got broken after breaking change on ComponentDescriptor::adopt
signature
#41699
Labels
Needs: React Native Team Attention
Tech: Fabric
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
The Problem
The 8th of September, this commit landed on main. This happened before the 0.73 branch cut, therefore it will affect all the apps that are going to be created with 0.73.
The commit is technically correct: before the commit, the
ComponentDescriptor
could take ownership of theShadowNode
that was passed in. Semantically, this is incorrect for Fabric, as theComponentDescriptor
should not own the reference to theShadowNode
.The commit changes this behavior and prevent this possibility from happening.
To achieve this, the signature of the
adopt
method has changed fromto
This was a breaking change for all the libraries already migrated to Fabric, but it was marked as in
[Internal]
change.Mitigation
We still want for this change to happen in the stable, final version of Fabric.
However, we want to give some time to library maintainers to migrate away from the old signature to the new one.
To do so, another PR has been created and it is going to be picked in the latest RC, so that library that have been migrated already to Fabric will continue working.
We are going to remove the old signature in ReactNative 0.74
Call to Action
If you are a library maintainer of a library that already migrated to Fabric, please:
adopt
method (not all the components have to do it)React Native Version
0.73.0-rc.0
Output of
npx react-native info
Not Relevant
Steps to reproduce
In Xcode: ⌘ + B to build the app
Snack, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: