From d223b45ae812dad1e49af5373c0953ccc6bfcbb9 Mon Sep 17 00:00:00 2001 From: Davyd NRB <4661784+retyui@users.noreply.github.com> Date: Fri, 9 Oct 2026 12:10:19 +0200 Subject: [PATCH] Modify preserveDestructuring default behavior Updated the logic for preserveDestructuring option to default to true if not specified. --- packages/react-native-babel-preset/src/configs/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-babel-preset/src/configs/main.js b/packages/react-native-babel-preset/src/configs/main.js index 13d1ecc3eef8..463c00155f81 100644 --- a/packages/react-native-babel-preset/src/configs/main.js +++ b/packages/react-native-babel-preset/src/configs/main.js @@ -147,9 +147,9 @@ const getPreset = (src, options, babel) => { options.customTransformOptions?.unstable_preserveBlockScoping, ); - // Preserve destructuring syntax if the experiment is enabled. + // Preserve destructuring syntax if the experiment is enabled. (no transform destructuring syntax by default) const preserveDestructuring = TRUE_VALS.has( - options.customTransformOptions?.unstable_preserveDestructuring, + options.customTransformOptions?.unstable_preserveDestructuring ?? true, ); const isNull = src == null;