Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

RN 0.74 New Architecture Support #7874

Open
1 task done
TheLonelyAstronaut opened this issue Apr 25, 2024 · 4 comments
Open
1 task done

RN 0.74 New Architecture Support #7874

TheLonelyAstronaut opened this issue Apr 25, 2024 · 4 comments

Comments

@TheLonelyAstronaut
Copy link
Contributor

TheLonelyAstronaut commented Apr 25, 2024

What happened?

After migration playground app to RN 74.0 with New Architecture enabled (Bridgeless mode enabled or disabled, same result), lib stopped working as expected (at least for iOS):

Tab bar and header are shown, but other content of the screen are not rendered. UIView, that located in the 'empty place' and holds RN View, occupies all available space, however, react component is not rendered (events are fired, checked in EventObserver on JS side), event constructor of class component is not called (thats why it not binds to EventObserver and events are not passed to component directly).

There is one more major problem for Android: starting from 0.74 version, interop with legacy architecture becomes stable, however, support of ShadowNodes was removed (it a problem for Android modal implementation).

Need to fix this, but it will be a good idea to reimplement core of this library to not use bridge at all, at least for Bridgeless mode, that now enabled by default with Fabric

What was the expected behaviour?

It should render content

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

Minimal reproducible example

In what environment did this happen?

React Native Navigation version: 7.39.2
React Native version: 0.74.0
Has Fabric (React Native's new rendering system) enabled: yes
Node version: 18

@NiuGuohui
Copy link

I think RNN has also encountered this issue: facebook/react-native#44266

@TheLonelyAstronaut
Copy link
Contributor Author

TheLonelyAstronaut commented Apr 29, 2024

@NiuGuohui well, iOS behaves differently. RNNAppDelegate uses RCTSurfacePresenterBridgeAdapter, but in new arch mode it's not working as it was in RN 0.73 (bridgeAdapter.surfacePresenter is always nil). Internally RCTSurfacePresenterBridgeAdapter uses NSNotificationCenter on bridge to handle events like handleJavaScriptDidLoadNotification and other, that should control surfacePresenter lifecycle, but it's not happening anymore. If we fix this, it will be only temporary solution, cause sometime in the future RCTSurfacePresenterBridgeAdapter becomes deprecated. It's important to fully exclude bridge to be able to launch this lib in future RN versions.

(Idk whats happening on Android, digging into iOS right now)

FYI @asafkorem

@TheLonelyAstronaut
Copy link
Contributor Author

Got it working on iOS Fabric with disabled bridgeless, working on bridgeless mode 🚧

@TheLonelyAstronaut
Copy link
Contributor Author

PR @asafkorem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants