Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
Reanimated crashed the App while using useAnimatedStyle

I'm trying to animate a card's border radius and shadow opacity but instantly closes on IOS. I'm not sure if I'm using reanimated correctly though. I feel like there is crucial mistake I'm making. Here is the code.


   const anim = loop({
      autoStart: true,
      duration: 1750,
      easing: EasingNode.inOut(EasingNode.ease),
    });

  const riskCardStyle = useAnimatedStyle(() => {
    const borderRadius = Animated.interpolateNode(anim, {
      inputRange: [-1, 0, 1],
      outputRange: [30, 0, 30],
      extrapolate: Extrapolate.CLAMP,
    });
    const shadowOpacity = Animated.interpolateNode(anim, {
      inputRange: [-100, 0, 100],
      outputRange: [1, 0, 1],
      extrapolate: Extrapolate.CLAMP,
    });
    return {
      backgroundColor: Colors.white,
      flex: 1,
      position: 'relative',
      borderTopLeftRadius: borderRadius,
      borderTopRightRadius: borderRadius,
      shadowColor: 'rgba(168, 179, 255, 0.4)',
      shadowOffset: {
        width: 0,
        height: -3,
      },
      shadowRadius: 20,
      shadowOpacity,
    };
  });

thanks in advance

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda