diff --git a/Libraries/Components/View/ReactNativeViewViewConfig.js b/Libraries/Components/View/ReactNativeViewViewConfig.js index e6fdf8e58d..4d6f0dd0a6 100644 --- a/Libraries/Components/View/ReactNativeViewViewConfig.js +++ b/Libraries/Components/View/ReactNativeViewViewConfig.js @@ -10,6 +10,7 @@ 'use strict'; import ReactNativeViewViewConfigAndroid from './ReactNativeViewViewConfigAndroid'; +import {Platform} from 'react-native'; const ReactNativeViewConfig = { uiViewClassName: 'RCTView', @@ -321,7 +322,9 @@ const ReactNativeViewConfig = { textTransform: true, tintColor: {process: require('../../StyleSheet/processColor')}, top: true, - transform: {diff: require('../../Utilities/differ/matricesDiffer')}, + transform: ((Platform.OS === 'ios' + ? {diff: require('../../Utilities/differ/matricesDiffer')} + : {process: require('../../StyleSheet/processTransform')}): any), transformMatrix: true, translateX: true, translateY: true, @@ -331,7 +334,9 @@ const ReactNativeViewConfig = { }, testID: true, top: true, - transform: {diff: require('../../Utilities/differ/matricesDiffer')}, + transform: ((Platform.OS === 'ios' + ? {diff: require('../../Utilities/differ/matricesDiffer')} + : {process: require('../../StyleSheet/processTransform')}): any), translateX: true, translateY: true, width: true, diff --git a/RNTester/js/examples/Transform/TransformExample.js b/RNTester/js/examples/Transform/TransformExample.js index f4c6b926a7..a824a70612 100644 --- a/RNTester/js/examples/Transform/TransformExample.js +++ b/RNTester/js/examples/Transform/TransformExample.js @@ -15,6 +15,43 @@ import {Animated, StyleSheet, Text, View} from 'react-native'; import type {Node, Element} from 'react'; +function AnimateTansformSingleProp() { + const [theta] = useState(new Animated.Value(45)); + const animate = () => { + theta.setValue(0); + Animated.timing(theta, { + toValue: 100, + duration: 3000, + useNativeDriver: false, + }).start(animate); + }; + + useEffect(() => { + animate(); + }); + + return ( + + + This text is flipping great. + + + ); +} + function Flip() { const [theta] = useState(new Animated.Value(45)); const animate = () => { @@ -160,6 +197,10 @@ const styles = StyleSheet.create({ box5Transform: { transform: [{translate: [-50, 35]}, {rotate: '50deg'}, {scale: 2}], }, + box6: { + backgroundColor: 'salmon', + alignSelf: 'center', + }, flipCardContainer: { marginVertical: 40, flex: 1, @@ -276,4 +317,11 @@ exports.examples = [ ); }, }, + { + title: 'Amimate Translate single prop', + description: "rotate: '360deg'", + render(): Node { + return ; + }, + }, ]; diff --git a/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java b/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java index 3d881c009b..1ccb0fe94e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +++ b/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java @@ -209,7 +209,7 @@ public class MainReactPackage extends TurboReactPackage { public ReactModuleInfoProvider getReactModuleInfoProvider() { try { Class reactModuleInfoProviderClass = - Class.forName("com.facebook.react.MainReactPackage$$ReactModuleInfoProvider"); + Class.forName("com.facebook.react.shell.MainReactPackage$$ReactModuleInfoProvider"); return (ReactModuleInfoProvider) reactModuleInfoProviderClass.newInstance(); } catch (ClassNotFoundException e) { // In OSS case, the annotation processor does not run. We fall back on creating this byhand diff --git a/scripts/test-manual-e2e.sh b/scripts/test-manual-e2e.sh index f021398f0c..3f874d455e 100755 --- a/scripts/test-manual-e2e.sh +++ b/scripts/test-manual-e2e.sh @@ -61,6 +61,8 @@ adb shell am start -n com.facebook.react.uiapp/.RNTesterActivity info "Press any key to open the workspace in Xcode, then build and test manually." info "" read -n 1 +success "Installing CocoaPods dependencies" +rm -rf RNTester/Pods && cd RNTester && pod install open "RNTester/RNTesterPods.xcworkspace" info "When done testing RNTester app on iOS and Android press any key to continue." @@ -98,7 +100,7 @@ info "" info "Press any key to run the sample in Android emulator/device" info "" read -n 1 -cd "/tmp/${project_name}" && react-native run-android +cd "/tmp/${project_name}" && npx react-native run-android info "Test the following on iOS:" info " - Disable Fast Refresh. It might be enabled from last time (the setting is stored on the device)"