react-native-animateable-text icon indicating copy to clipboard operation
react-native-animateable-text copied to clipboard

[EXPO-53][RN-0.79]: Text styles are not applying

Open schriker opened this issue 5 months ago • 3 comments

When adding styles to <AnimateableText> looks like none of the style are being applied to the text, when adding the same styles to <Text> from RN, all seems to work fine.

I have tried inline styles, animated styles, and StyleSheet styles, but no luck. I also tried version 0.15.0 and 0.16.0-beta.0.

This issues seems to be on both old and new arch.

Sample repository: https://github.com/schriker/react-native-animateable-text-style

Sample code:

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import AnimateableText from 'react-native-animateable-text';
import { useAnimatedProps, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';

export default function App() {
  const reanimatedText = useSharedValue('World');

  const animatedProps = useAnimatedProps(() => {
    return {
      text: reanimatedText.value,
    };
  });

  const animatedStyles = useAnimatedStyle(() => {
    return {
      color: 'red'
    };
  });

  const inlineStyle = {
    color: 'purple',
    fontSize: 50
  }

  return (
    <View style={styles.container}>
      <AnimateableText animatedProps={animatedProps} style={[styles.text]} />
      <AnimateableText animatedProps={animatedProps} style={inlineStyle} />
      <AnimateableText animatedProps={animatedProps} style={[animatedStyles]} />

      <View style={{ marginTop: 30, alignItems: 'center' }}>
        <Text children="Text Component" style={[styles.text]} />
        <Text children="Text Component" style={inlineStyle} />
      </View>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  text: {
    fontStyle: 'italic',
    fontWeight: 'bold',
    fontSize: 25, 
    color: 'red'
  }
});

Result:

Image

schriker avatar Jun 21 '25 12:06 schriker

Same issue

"expo": "53.0.9",
"react-native": "0.79.2",
"react-native-animateable-text": "0.15.0",
"react-native-reanimated": "3.17.4"

Shaninnik avatar Jun 23 '25 18:06 Shaninnik

facing same issue

roo12312 avatar Jun 24 '25 10:06 roo12312

Yes, I have the same issue as well, unfortunately cannot use this library like this 😢

Rednegniw avatar Jun 27 '25 08:06 Rednegniw

I am not facing any issues with the following:

    "expo": "^53.0.0",
    "react-native": "0.79.5",
    "react-native-animateable-text": "^0.16.0-beta.0",
    "react-native-reanimated": "~3.17.4",

GLSinthu avatar Jul 03 '25 13:07 GLSinthu

Can confirm RN 0.79.5 seems to be fixing this issue:

Image Image

I will leave this issue open, but it looks like a regression from RN.

schriker avatar Jul 06 '25 10:07 schriker

0.16.0-beta.0 fixed this for me

Shaninnik avatar Jul 09 '25 13:07 Shaninnik

Is it possible for you @WadhahEssam to release the fix to the latest tag?

matinzd avatar Jul 25 '25 11:07 matinzd

sorry guys, I just released 0.16.0, it should be the latest now, @matinzd thank you for the reminder

WadhahEssam avatar Jul 27 '25 13:07 WadhahEssam