Installed react navigation

This commit is contained in:
Keannu Christian Bernasol 2023-03-05 20:03:56 +08:00
parent 204677dff3
commit 2756fb20e4
3 changed files with 186 additions and 9 deletions

View file

@ -1,5 +1,7 @@
package com.reactnative_notes;
import android.os.Bundle;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
@ -7,8 +9,14 @@ import com.facebook.react.defaults.DefaultReactActivityDelegate;
public class MainActivity extends ReactActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* Returns the name of the main component registered from JavaScript. This is
* used to schedule
* rendering of the component.
*/
@Override
@ -17,8 +25,10 @@ public class MainActivity extends ReactActivity {
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util
* class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and
* Concurrent React
* (aka React 18) with two boolean flags.
*/
@Override
@ -28,8 +38,9 @@ public class MainActivity extends ReactActivity {
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
// If you opted-in for the New Architecture, we enable Concurrent React (i.e.
// React 18).
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
);
);
}
}