Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rendering of RN Tester New Architecture examples in Android
Summary: When bridgeless is enabled, RN Tester New Architecture examples crashed with a StackOverflow Exception The root cause of this issue is that MyLegacyViewManager is sending an event to JS during the execution of MyLegacyViewManager.createViewInstance() method. This is a problem because the delivery of events depend on the "id" of the view, but the "id" of the view is set after MyLegacyViewManager.createViewInstance() finishes executing. The documentations "implicitly" mentions to not set props during the execution of the ViewManager.createViewInstance() method: https://reactnative.dev/docs/native-components-android#2-implement-method-createviewinstance To fix this issue I'm removing the execution of the method that triggers the event. bypass-github-export-checks changelog: [Android][Fix] Fix rendering of 'RN Tester New Architecture examples' when bridgeless is enabled Reviewed By: fkgozali Differential Revision: D51047007 fbshipit-source-id: 17be493f79114fa402029063e79fabc1d90efc17
- Loading branch information