react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Transform translateX throwing an error with percentage values

Open lcherukuri opened this issue 4 years ago • 3 comments

Problem Description

Here is the code that does a simple transform animation https://snack.expo.dev/@lcherukuri/feaaf3

The code is working on the ios simulator. But throwing an error in windows desktop app

import React, {useEffect} from 'react';
import {Animated, SafeAreaView, Text} from 'react-native';

const TranslatingModule = () => {
  const animatedTranslation = new Animated.Value(0);
  const interpolatedAnimation = animatedTranslation.interpolate({
    inputRange: [0, 100],
    outputRange: ['0%', '100%'],
  });

  useEffect(() => {
    Animated.timing(animatedTranslation, {
      toValue: 100,
      duration: 3000,
      useNativeDriver: true,
    }).start(); 
  }, []);

  return (
    <SafeAreaView>
      <Animated.View
        style={{
          transform: [{translateX: interpolatedAnimation}],
        }}>
        <Text>This should slide from left to right</Text>
      </Animated.View>
    </SafeAreaView>
  );
};

export default TranslatingModule;

Capture

Steps To Reproduce

https://snack.expo.dev/@lcherukuri/feaaf3

Expected Results

expect the text to slide from left to right

CLI version

7.0.3

Environment

System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 14.71 GB / 31.73 GB
  Binaries:
    Node: 16.14.0 - ~\AppData\Local\Volta\tools\image\node\16.14.0\node.EXE
    Yarn: 1.22.18 - ~\AppData\Local\Volta\tools\image\yarn\1.22.18\bin\yarn.CMD
    npm: 8.3.1 - ~\AppData\Local\Volta\tools\image\node\16.14.0\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.17763.0, 10.0.18362.0, 10.0.19041.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 16.11.32510.428 (Visual Studio Professional 2019)
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.0.0-20220206-2010-113f8257c => 0.0.0-20220206-2010-113f8257c
    react-native-windows: 0.0.0-canary.461 => 0.0.0-canary.461
  npmGlobalPackages:
    *react-native*: Not Found

Target Platform Version

No response

Target Device(s)

Desktop

Visual Studio Version

No response

Build Configuration

No response

Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/@lcherukuri/feaaf3

lcherukuri avatar Jun 24 '22 23:06 lcherukuri

This issue is reported on an older version of React Native for Windows than is current, and is believed to be fixed in the latest version. Please try to update to the latest version and confirm if your issue still occurs. Per-version documentation is available here

ghost avatar Jun 27 '22 18:06 ghost

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

ghost avatar Jul 04 '22 20:07 ghost

Did you got the solution?

AbizerS10 avatar Jul 15 '23 21:07 AbizerS10