-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
React-native 0.68.* is not compatible with RNN right now - exposing createReactActivityDelegate - and support for new architecture (Fabric) #7466
Comments
Hey @SudoPlz, |
@SudoPlz as far as I can tell this only affects 0.68 when trying to enable the new architecture, right? 0.68 should work when keeping the old way, right? |
@danilobuerger not really sure to be honest, this requires testing. |
Alright, I will take a look at that once 0.68 rc2 is out. |
So, I investigated this using the old architecture for now. iOSThere is a breaking change in the app template, that we should communicate in the docs: diff --git a/ios/feastr/Classes/AppDelegate.m b/ios/feastr/Classes/AppDelegate.m
index d29d69933..8b67f1d11 100644
--- a/ios/feastr/Classes/AppDelegate.m
+++ b/ios/feastr/Classes/AppDelegate.m
@@ -111,7 +111,7 @@ - (void)applicationWillEnterForeground:(UIApplication *)application {
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
#if DEBUG
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif AndroidWe need a new product flavor. The RootView interface added two more methods that we need to implement in ModalContentLayout: /**
* Called when a child starts a native gesture (e.g. a scroll in a ScrollView). Should be called
* from the child's onTouchIntercepted implementation.
*/
void onChildStartedNativeGesture(View childView, MotionEvent ev);
/**
* Called when a child ends a native gesture. Should be called from the child's onTouchIntercepted
* implementation.
*/
void onChildEndedNativeGesture(View childView, MotionEvent ev); diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt
index da7d5b1..ea8516f 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt
@@ -49,9 +49,15 @@ class ModalContentLayout(context: Context?) : ReactViewGroup(context), RootView{
updateFirstChildView()
}
}
+ override fun onChildStartedNativeGesture(child: View, androidEvent: MotionEvent?) {
+ mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, this.getEventDispatcher())
+ }
override fun onChildStartedNativeGesture(androidEvent: MotionEvent?) {
mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, this.getEventDispatcher())
}
+ override fun onChildEndedNativeGesture(child: View, androidEvent: MotionEvent?) {
+ mJSTouchDispatcher.onChildEndedNativeGesture(androidEvent, this.getEventDispatcher())
+ }
override fun requestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {}
private fun getEventDispatcher(): EventDispatcher? {
val reactContext: ReactContext = this.getReactContext() |
@yogevbd I think we should leave this open until we also support the new architecture? |
Your'e right. |
I started looking at iOS + new arch (rnn 7.26.0, rn 0.68 rc2 with pending patched for rc3):
I got this to compile and work. So far only with waitToRender turned off and the views seem misaligned. |
When can we expect a release for 0.68.0 support since the stable released yesterday ? |
@YazeedAsaad rnn does work with rn 0.68 in its default configuration (old architecture). |
it does indeed, i meant the new Architecture if that’s planned |
I am not aware that any one is working on it. But feel free to submit a PR if changes are required to make it work with the new architecture. |
I would perfer if it was possible to opt into Fabric on a per screen basis as it would enable incremental adoption. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I get where you're coming from, but both the docs and public class MainActivity extends NavigationActivity {} Without this, the build fails because |
Does anyone know if someone is already working in this? Not that I'm offering, just wanted to see if there is any progress |
Please try to add this to settings.gradle: |
@guyca I noticed you worked on #7518.
Thanks for all your hard work. |
@oferRounds Yes, we use it with RN 0.68.4. |
Thanks @guyca! so that means RNN use the new Arch? |
@guyca any news with that? Thank you 🙏 |
Any updates? |
Any updates? |
🐛 Bug Report
Hey there,
I'm opening that issue to keep track of react-native 0.68 support. Right now it seems that react-native navigation doesn't work with 0.68 and the new architecture.
Specifically the part where we're supposed to inject
ReactRootViews
seems to be the pain point, since RNN doesn't export any way to do that currently.https://github.com/react-native-community/rn-diff-purge/blob/release/0.68.0-rc.1/RnDiffApp/android/app/src/main/java/com/rndiffapp/MainActivity.java#L23
cc'ing @yogevbd on this to hear some thoughts.
The text was updated successfully, but these errors were encountered: