0

Using the wix react-native-navigation library: I have a ReactContextBaseJavaModule that (on request from my js app) starts an activity which contains the following code: mReactRootView = new ReactRootView(context); mReactInstanceManager.attachRootView(mReactRootView); and later mReactRootView.startReactApplication

all that works well. However, when I use a third part RN library in my "second" js app it tries to add a fragment in it's onAttachedToWindow method. The activity it gets from "getReactContext().getCurrentActivity()" is a NavigationActivity and it uses the fragment manager from that to try and add the fragment. I get the error "Can not perform this action after onSaveInstanceState". Is this because I'm getting the wrong activity back due to the navigation library interfering ?

Martin Lockett
  • 2,275
  • 27
  • 31

1 Answers1

0

OK, just found out what I was doing wrong. The activity I was creating extended AppCompatActivity - it should have extended ReactActivity

Martin Lockett
  • 2,275
  • 27
  • 31