Enable Fabric in react-native 0.71 using ReactFragment in android

188 views Asked by At

I am currently having a usecase where I need to start my react-native component using ReactFragment using following syntax

 val reactNativeFragment: Fragment = ReactFragment.Builder()
        .setComponentName("ComponentName")
        .setLaunchOptions(getLaunchOptions("test message"))
        .build()

    supportFragmentManager
        .beginTransaction()
        .add(R.id.react_container, reactNativeFragment)
        .commit()

But this will not enable fabric and results in following

 Running "ComponentName" with {"initialProps":{"message":"test message"},"rootTag":11}

and not the following which I am getting when I use a ReactActivity ReactActivityDelegate

 Running "ComponentName" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}

I am sure there will be any property which I am missing here. Thanks for answering in advance.

0

There are 0 answers