Skip to content

Commit b9f3186

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Make the New Architecture the default (facebook#43135)
Summary: Pull Request resolved: facebook#43135 This change makes the New Architecture the default on both iOS and Android. This means that new application will be created using the New Architecture by default. It is still possible to opt out from it. ## Changelog [General][Changed] - Make the new architecture the default Reviewed By: cortinico, sammy-SC, dmytrorykun Differential Revision: D54006751 fbshipit-source-id: bd7de0814925b65ab180105e18c1f6f275ba2672
1 parent 8cbf46a commit b9f3186

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,10 @@ def test_newArchEnabled_whenRCTNewArchEnabledIsSetTo0_returnFalse
419419
assert_false(is_enabled)
420420
end
421421

422-
def test_newArchEnabled_whenRCTNewArchEnabledIsNotSet_returnFalse
422+
def test_newArchEnabled_whenRCTNewArchEnabledIsNotSet_returnTrue
423423
ENV["RCT_NEW_ARCH_ENABLED"] = nil
424424
is_enabled = NewArchitectureHelper.new_arch_enabled
425-
assert_false(is_enabled)
425+
assert_true(is_enabled)
426426
end
427427

428428

packages/react-native/scripts/cocoapods/new_architecture.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,6 @@ def self.compute_new_arch_enabled(new_arch_enabled, react_native_version)
186186
end
187187

188188
def self.new_arch_enabled
189-
return ENV["RCT_NEW_ARCH_ENABLED"] == "1"
189+
return ENV["RCT_NEW_ARCH_ENABLED"] == nil || ENV["RCT_NEW_ARCH_ENABLED"] == "1"
190190
end
191191
end

packages/react-native/template/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3434
# your application. You should enable this flag either if you want
3535
# to write custom TurboModules/Fabric components OR use libraries that
3636
# are providing them.
37-
newArchEnabled=false
37+
newArchEnabled=true
3838

3939
# Use this property to enable or disable the Hermes JS engine.
4040
# If set to false, you will be using JSC instead.

0 commit comments

Comments
 (0)