Skip to content

Commit

Permalink
Make the New Architecture the default (#43135)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 22, 2024
1 parent 8cbf46a commit b9f3186
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ def test_newArchEnabled_whenRCTNewArchEnabledIsSetTo0_returnFalse
assert_false(is_enabled)
end

def test_newArchEnabled_whenRCTNewArchEnabledIsNotSet_returnFalse
def test_newArchEnabled_whenRCTNewArchEnabledIsNotSet_returnTrue
ENV["RCT_NEW_ARCH_ENABLED"] = nil
is_enabled = NewArchitectureHelper.new_arch_enabled
assert_false(is_enabled)
assert_true(is_enabled)
end


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ def self.compute_new_arch_enabled(new_arch_enabled, react_native_version)
end

def self.new_arch_enabled
return ENV["RCT_NEW_ARCH_ENABLED"] == "1"
return ENV["RCT_NEW_ARCH_ENABLED"] == nil || ENV["RCT_NEW_ARCH_ENABLED"] == "1"
end
end
2 changes: 1 addition & 1 deletion packages/react-native/template/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

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

0 comments on commit b9f3186

Please sign in to comment.