Fix issues with rn 0.74 bridgeless #3535
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
On RN 0.74 with new arch enabled (bridgeless) I encountered 2 errors.
The first one is because of the copy of the native module object. With new arch bridgeless the native module are proxy objects so copying it just results in an empty object, which resulted in my app crashing when calling
setAccessToken
.The 2nd one is related to codegen:
Invariant Violation: Event cannot be both direct and bubbling: topPress
. This seems to happen because we extendViewProps
and it already defines a onPress prop that is aBubblingEventHandler
. Changing it toBubblingEventHandler
fixes it.Tested in the example app by enabling bridgeless and testing that Show click example still works.
Checklist
CONTRIBUTING.md
yarn generate
in the root folder/example
app./example
)Screenshot OR Video
N/A
Component to reproduce the issue you're fixing
N/A