Skip to content
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

Using Animated with border[Top/RIght/Bottom/Left] property is not playing well #30504

Closed
questionablequestion opened this issue Nov 30, 2020 · 2 comments
Labels
API: Animated Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@questionablequestion
Copy link

questionablequestion commented Nov 30, 2020

Description

Adding animation to View that has borders declared by top/right/bottom/left isn't animating well. I have confirmed this issue on Android 8.x. Haven't tested earlier versions, but iOS 13 and Android 10 works fine.

React Native version:

react-native: ^0.63.3 => 0.63.3

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Add View with style where you add only borderTopColor
  2. Add Animation to that view

Expected Results

For circle to rotate normally without glitching.

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

import React from 'react';
import { Animated, Easing, StyleSheet } from 'react-native';

const Spinner = React.memo() => {
  const spinValue = new Animated.Value(0);

  Animated.loop(
    Animated.timing(spinValue, {
      toValue: 1,
      duration: 1000,
      easing: Easing.linear,
      useNativeDriver: true,
    }),
  ).start();

  const spin = spinValue.interpolate({
    inputRange: [0, 1],
    outputRange: ['0deg', '360deg'],
  });

  return (
    <Animated.View style={[style.root, {transform: [{rotate: spin}]}]}></Animated.View>
  );
});

export default Spinner;

const style = StyleSheet.create({
    root: {
        width: 20,
        height: 20,
        borderRadius: 10,
        borderWidth: 2,
        borderColor: 'black',
        borderLeftColor: 'transparent',
        borderBottomColor: 'transparent',
    }
})
@github-actions
Copy link

github-actions bot commented Dec 1, 2021

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 1, 2021
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@facebook facebook locked as resolved and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: Animated Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants