mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Re-enable Fabric in the default app template/RN-Tester (#36717)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36717 After D43711737 landed, it turns out that Fabric is always disabled for both RN-Tester and new app from template (so for 0.72 also RC0). The reason is that a new method `createRootView(Bundle)` was introduced inside `ReactActivityDelegate`. Both RN Tester and the template were using the old `createRootView()` method which is not called anymore at this stage (should potentially be deprecated?). This diff fixes it by overriding both method inside `DefaultReactActivityDelegate` so that both methods are setting the Fabric renderer. Changelog: [Android] [Fixed] - Re-enable Fabric in the default app template/RN-Tester Reviewed By: cipolleschi Differential Revision: D44536222 fbshipit-source-id: d22a0c522f011a8fe4d27b5d8f2fcf5dd13c3058
This commit is contained in:
committed by
Facebook GitHub Bot
parent
66ae98e4a4
commit
e5dd9cdc66
+4
@@ -7,6 +7,7 @@
|
||||
|
||||
package com.facebook.react.defaults
|
||||
|
||||
import android.os.Bundle
|
||||
import com.facebook.react.ReactActivity
|
||||
import com.facebook.react.ReactActivityDelegate
|
||||
import com.facebook.react.ReactRootView
|
||||
@@ -43,4 +44,7 @@ open class DefaultReactActivityDelegate(
|
||||
|
||||
override fun createRootView(): ReactRootView =
|
||||
ReactRootView(context).apply { setIsFabric(fabricEnabled) }
|
||||
|
||||
override fun createRootView(bundle: Bundle): ReactRootView =
|
||||
ReactRootView(context).apply { setIsFabric(fabricEnabled) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user