Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard against setId being called on the ReactRootView outside of RN core
Summary: The RootView being managed by Fabric should have an id of View.NO_ID when it is "handed over" to RN. This is true for Fabric and non-Fabric and setting a custom id on the ReactRootView has never been supported. I'm temporarily (?) adding an additional check earlier and into ReactRootView to hopefully catch any of these issues early. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D26077509 fbshipit-source-id: 59e1ec080504e50698acc654c29120f039238a96
- Loading branch information
4f3b174
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing numerous crashes in hybrid apps using ReactRootView to display react-native screens as Activities. Can you please explain the reason for its addition.
4f3b174
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the comment on the code already clear enough? What else is unclear?
4f3b174
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It causing the app to crash while staying in react native while the comment says it checks when controls comes back to RN.
I think this should be downgraded to a redbox warning as this used to work fine without this check in place for years in our hybrid app having 100 million+ users.
Please refer to this issue: #33121
We had to completely stop react native upgrade for our app and remove this code to make it working again.