Skip to content

V8 new arch #3754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 59 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c283cc4
Remove old dialog
M-i-k-e-l Jan 22, 2025
64da541
Move Incubator.Dialog to Dialog
M-i-k-e-l Jan 22, 2025
7f3b7eb
Remove PanGestureView
M-i-k-e-l Jan 29, 2025
1efe294
Remove PanDismissibleView
M-i-k-e-l Jan 29, 2025
8d88280
Remove PanResponderView
M-i-k-e-l Jan 29, 2025
06e3219
Remove PanListenerView
M-i-k-e-l Jan 29, 2025
79da1a1
Remove PanningProvider
M-i-k-e-l Jan 29, 2025
068332a
Remove asPanViewConsumer
M-i-k-e-l Jan 29, 2025
4a2128a
Remove PanningContext
M-i-k-e-l Jan 29, 2025
3c63f2a
Promote PanView and hooks from Incubator to standard components
M-i-k-e-l Jan 29, 2025
27813ca
Fix category
M-i-k-e-l Feb 6, 2025
8669ced
Add v8 doc
M-i-k-e-l Feb 6, 2025
64b45b3
Upgrade to react native 0.76.9
M-i-k-e-l May 6, 2025
c05b635
RN77 upgrade + new arch
M-i-k-e-l May 7, 2025
3d4cad6
Remove TextInputDelKeyHandlerPackage (Android)
M-i-k-e-l May 7, 2025
3004293
KeyboardAccessoryView on Android - fix crash (one bug left)
M-i-k-e-l May 8, 2025
2849be7
Pressing on dismiss (x) only fully works the second time - a very com…
M-i-k-e-l May 8, 2025
6b4b1bf
Remove unused code
M-i-k-e-l May 8, 2025
436f0da
HighlighterViewManager - fix (use new API)
M-i-k-e-l May 8, 2025
78f55fd
Fix gesture handler changed style
M-i-k-e-l May 20, 2025
56fb161
Fix images (unrelated)
M-i-k-e-l May 20, 2025
a46bc21
Fix PanViewScreen (unrelated)
M-i-k-e-l May 20, 2025
2d76207
Fix dragging in SortableList and SortableGridList
M-i-k-e-l May 25, 2025
50c7644
Update navigation
M-i-k-e-l May 25, 2025
3429111
Change iOS back to Objective-C
M-i-k-e-l May 25, 2025
f4cd863
Fix screen - border color
M-i-k-e-l May 25, 2025
db5509f
Revert to older reanimated and gesture-handler versions
M-i-k-e-l May 26, 2025
bca8230
Drawer - fix animation flickering
M-i-k-e-l May 27, 2025
8f25560
Remove comment
M-i-k-e-l May 27, 2025
6350059
StackAggregator - several fixes - see https://github.com/wix/react-na…
M-i-k-e-l May 27, 2025
160155c
Drawer - fix color not being shown with multiple buttons (RectButton …
M-i-k-e-l May 27, 2025
ddca74f
Fix
M-i-k-e-l May 27, 2025
9e92fa1
Downgrading reanimated and gesture handler
Inbal-Tish May 27, 2025
5b71dda
Fix
M-i-k-e-l May 27, 2025
b3ae5f0
Fix iOS (setimmediate)
M-i-k-e-l May 29, 2025
6eb5fea
Merge branch 'master' into v8
M-i-k-e-l Jun 3, 2025
5b00e0a
Move PanViewScreen and sort a little
M-i-k-e-l Jun 3, 2025
2962046
remove UIManager.setLayoutAnimationEnabledExperimental
Inbal-Tish Jun 3, 2025
02a89aa
Add StackAggregator doc (#3745)
M-i-k-e-l Jun 3, 2025
82435fa
Merge branch 'master' into rn76-old-arch
M-i-k-e-l Jun 3, 2025
8d65eff
Merge branch 'rn76-old-arch' into rn77-new-arch
M-i-k-e-l Jun 3, 2025
c8e888b
Update RNN
M-i-k-e-l Jun 3, 2025
8741eaf
Merge branch 'master' into rn76-old-arch
M-i-k-e-l Jun 9, 2025
176e88a
Merge branch 'rn76-old-arch' into rn77-new-arch
M-i-k-e-l Jun 9, 2025
49138d6
Fix snapshot
M-i-k-e-l Jun 9, 2025
e5adc55
Fix TS
M-i-k-e-l Jun 9, 2025
0a6c868
Merge branch 'rn76-old-arch' into rn77-new-arch
M-i-k-e-l Jun 9, 2025
b3dfb98
Fix TS
M-i-k-e-l Jun 9, 2025
d37b5c4
Fix snapshot
M-i-k-e-l Jun 9, 2025
f432542
Merge branch 'master' into v8
M-i-k-e-l Jun 9, 2025
5785fb2
Remove SharedTransition
M-i-k-e-l Jun 9, 2025
b0d6d88
StackAggregator - several fixes
M-i-k-e-l Aug 14, 2024
98f49e5
Merge branch 'master' into v8
M-i-k-e-l Jun 9, 2025
c048dde
Merge branch 'v8' into v8-new-arch
M-i-k-e-l Jun 9, 2025
212073d
Fix merge
M-i-k-e-l Jun 9, 2025
8eaee4a
Debug
M-i-k-e-l Jun 10, 2025
5afa39d
Test
M-i-k-e-l Jun 10, 2025
5f55911
Update reanimated to 3.17.0 and navigation
M-i-k-e-l Jun 12, 2025
904354e
Merge branch 'master' into v8-new-arch
M-i-k-e-l Jun 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -43,11 +43,17 @@ expoDemo/android/gradlew.bat
node_modules/
npm-debug.log

# yarn
# Yarn
.yarn/*
yarn-error.log
**/.yarn/cache
**/.yarn/install-state.gz
**/.yarn/yarn.build.json
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.vscode

Expand All @@ -74,7 +80,7 @@ docs/components/**
!scripts/build

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/
/ios/Podfile.lock
expoDemo/ios/Pods
Expand Down
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

18 changes: 10 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ apply plugin: "com.facebook.react"
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// The root of your project, i.e. where "package.json" lives. Default is '../..'
root = file("../../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
Expand Down Expand Up @@ -51,6 +53,8 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

/* Autolinking */
autolinkLibrariesWithApp()
}

Expand Down Expand Up @@ -122,7 +126,6 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration:0.73.9")

implementation project(':react-native-navigation')
implementation 'com.facebook.fresco:fresco:2.5.0'
Expand All @@ -135,4 +138,3 @@ dependencies {
}
}

// apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
7 changes: 3 additions & 4 deletions android/app/src/main/java/com/rnuilib/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import com.reactnativenavigation.NavigationApplication
import com.wix.reactnativeuilib.UiLibPackageList;
Expand All @@ -35,15 +35,14 @@ class MainApplication : NavigationApplication() {
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,9 @@
import android.app.Application;
import androidx.annotation.NonNull;
import com.facebook.react.PackageList;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
import com.facebook.react.bridge.JSIModulePackage;
import com.facebook.react.bridge.JSIModuleProvider;
import com.facebook.react.bridge.JSIModuleSpec;
import com.facebook.react.bridge.JSIModuleType;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UIManager;
import com.facebook.react.fabric.ComponentFactory;
import com.facebook.react.fabric.CoreComponentsRegistry;
import com.facebook.react.fabric.EmptyReactNativeConfig;
import com.facebook.react.fabric.FabricJSIModuleProvider;
import com.facebook.react.uimanager.ViewManagerRegistry;
import com.rnuilib.BuildConfig;
import java.util.ArrayList;
import java.util.List;
/**
* A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
Expand Down Expand Up @@ -59,43 +44,4 @@ protected String getJSMainModuleName() {
// for the new architecture and to use TurboModules correctly.
return new MainApplicationTurboModuleManagerDelegate.Builder();
}
@Override
protected JSIModulePackage getJSIModulePackage() {
return new JSIModulePackage() {
@Override
public List<JSIModuleSpec> getJSIModules(
final ReactApplicationContext reactApplicationContext,
final JavaScriptContextHolder jsContext) {
final List<JSIModuleSpec> specs = new ArrayList<>();
// Here we provide a new JSIModuleSpec that will be responsible of providing the
// custom Fabric Components.
specs.add(
new JSIModuleSpec() {
@Override
public JSIModuleType getJSIModuleType() {
return JSIModuleType.UIManager;
}
@Override
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
final ComponentFactory componentFactory = new ComponentFactory();
CoreComponentsRegistry.register(componentFactory);
// Here we register a Components Registry.
// The one that is generated with the template contains no components
// and just provides you the one from React Native core.
MainComponentsRegistry.register(componentFactory);
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
ViewManagerRegistry viewManagerRegistry =
new ViewManagerRegistry(
reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
return new FabricJSIModuleProvider(
reactApplicationContext,
componentFactory,
new EmptyReactNativeConfig(),
viewManagerRegistry);
}
});
return specs;
}
};
}
}
3 changes: 2 additions & 1 deletion android/app/src/main/res/drawable/rn_edit_text_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
>
<selector>
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
Expand Down
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

buildscript {
ext {
buildToolsVersion = "34.0.0"
buildToolsVersion = "35.0.0"
minSdkVersion = 26
compileSdkVersion = 34
compileSdkVersion = 35
targetSdkVersion = 34
RNNKotlinVersion = "1.8.22"
ndkVersion = "25.1.8937393"
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
mavenLocal()
Expand All @@ -19,7 +19,7 @@ buildscript {
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$RNNKotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

Expand Down
3 changes: 1 addition & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
# org.gradle.parallel=true

android.useAndroidX=true
android.enableJetifier=true

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
Expand All @@ -29,7 +28,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
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
21 changes: 12 additions & 9 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -145,15 +148,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +205,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"peerDependencies": {
"react": "^18.2.0",
"react-native": "^0.71.2",
"react-native": "^0.76.9",
"react-native-ui-lib": "*",
"semver": "^5.5.0"
}
Expand Down
22 changes: 3 additions & 19 deletions demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {UIManager, I18nManager} from 'react-native';
import {I18nManager} from 'react-native';
import {navigationData as menuStructure} from './screens/MenuStructure';
import {loadDemoConfigurations} from './configurations';

UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); // eslint-disable-line
I18nManager.allowRTL(true);

module.exports = {
Expand Down Expand Up @@ -87,15 +86,6 @@ module.exports = {
get PageControlScreen() {
return require('./screens/componentScreens/PageControlScreen').default;
},
get PanDismissibleScreen() {
return require('./screens/componentScreens/PanDismissibleScreen').default;
},
get PanListenerScreen() {
return require('./screens/componentScreens/PanListenerScreen').default;
},
get PanResponderScreen() {
return require('./screens/componentScreens/PanResponderScreen').default;
},
get PickerScreen() {
return require('./screens/componentScreens/PickerScreen').default;
},
Expand All @@ -108,9 +98,6 @@ module.exports = {
get SegmentedControlScreen() {
return require('./screens/componentScreens/SegmentedControlScreen').default;
},
get SharedTransitionScreen() {
return require('./screens/componentScreens/SharedTransitionScreen').default;
},
get SkeletonViewScreen() {
return require('./screens/componentScreens/SkeletonViewScreen').default;
},
Expand Down Expand Up @@ -244,16 +231,13 @@ module.exports = {
get SortableGridList() {
return require('./screens/componentScreens/SortableGridListScreen').default;
},
// Incubator
get PanViewScreen() {
return require('./screens/incubatorScreens/PanViewScreen').default;
return require('./screens/componentScreens/PanViewScreen').default;
},
// Incubator
get IncubatorSlider() {
return require('./screens/incubatorScreens/IncubatorSliderScreen').default;
},
get IncubatorDialog() {
return require('./screens/incubatorScreens/IncubatorDialogScreen').default;
},
get IncubatorToast() {
return require('./screens/incubatorScreens/IncubatorToastScreen').default;
},
Expand Down
Loading