Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix issues with rn 0.74 bridgeless #3535

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

janicduplessis
Copy link
Contributor

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 extend ViewProps and it already defines a onPress prop that is a BubblingEventHandler. Changing it to BubblingEventHandler fixes it.

Tested in the example app by enabling bridgeless and testing that Show click example still works.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

N/A

Component to reproduce the issue you're fixing

N/A

@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@janicduplessis janicduplessis temporarily deployed to CI with Mapbox Tokens June 18, 2024 05:37 — with GitHub Actions Inactive
@mfazekas
Copy link
Contributor

@janicduplessis thanks, that's awesome!

@mfazekas mfazekas merged commit b74fc6f into rnmapbox:main Jun 18, 2024
11 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants