software-mansion / react-native-screens

Native navigation primitives for your React Native app.
https://docs.swmansion.com/react-native-screens/
MIT License
3.1k stars 521 forks source link

React Native 0.76 (new arch, bridgeless) support #2441

Closed craiganderson-iotv closed 3 weeks ago

craiganderson-iotv commented 3 weeks ago

Description

Using React Native 0.76 with the new architecture in bridgeless mode results in two pathways for errors on Android:

  1. Using react-native-screens@3.34.1 will build correctly, but encounteres the same issue as #2324
  2. Using react-native-screens@3.35.0-rc.1, which fixes the above, will not build for 0.76

I managed to patch 3.34.1 according to #2289, which allows the error to be bypassed, but then only shows a white screen. Everything works after closing / opening the app again

Steps to reproduce

  1. Use React Native 0.76.0 and react-native-screens@3.34.1
  2. Encounter an error whilst running in dev mode
  3. Hot-reload

Snack or a link to a repository

-

Screens version

3.34.1

React Native version

0.76.0

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 3 weeks ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] commented 3 weeks ago

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

Hao-yiwen commented 3 weeks ago

Same question.

kkafar commented 3 weeks ago

Hey @craiganderson-iotv thanks for reporting. We've just released 3.35.0 which should resolve the situation.

Let me know if that is not the case.

tohel17 commented 3 weeks ago

@kkafar faced this same issue on 0.75.4 updated react-native-screens to 3.35.0 getting this error image

kkafar commented 3 weeks ago

Hey @tohel17, the issue you encounter is not related to react-native-screens. It is related to react-native-safe-area-context and possibly this breaking change introduced with 0.76.0 version of react-native.

tohel17 commented 3 weeks ago

@kkafar My bad updating safe area library fixed it.

kkafar commented 3 weeks ago

@tohel17 I'm glad to hear that!