axelra-ag / react-native-animateable-text

🆎 A fork of React Native's <Text/> component that supports Animated Values!
https://www.npmjs.com/package/react-native-animateable-text
MIT License
360 stars 27 forks source link

Component doesn't render new `useAnimatedProps` #32

Open vladyslavNiemtsev opened 2 years ago

vladyslavNiemtsev commented 2 years ago

Hi @JonnyBurger !

I have issue with component and the problem with that when I pass new animated props (which depends from useDerivedValue hook) in component - the changes does not displayed.

The changes displaying only when I update derived value one more time.

Versions: react native: 0.66 reanimated: 2.7.0 react-native-animateable-text: 0.8.2

vladyslavNiemtsev commented 2 years ago

Maybe related issue:

https://github.com/software-mansion/react-native-reanimated/issues/3244

vladyslavNiemtsev commented 2 years ago

By the way:

Thanks!

mBarlescu commented 2 years ago

Hi @JonnyBurger !

I have issue with component and the problem with that when I pass new animated props (which depends from useDerivedValue hook) in component - the changes does not displayed.

The changes displaying only when I update derived value one more time.

Versions: react native: 0.66 reanimated: 2.7.0 react-native-animateable-text: 0.8.2

Have you figured out the issue yet? And how to solve? I'm experiencing the same.

vladyslavNiemtsev commented 2 years ago

@mBarlescu Hi!

I just changed values with setTimeout with 0 timer

gilons commented 5 months ago

I fixed it by not using this package but rather using <TextInput editable={false} ref={textRef}/> and textRef.current.setNativeProps as explained here in the docs.

Also, this package appears to be heavy just animating text, 20MB unpacked size

Screenshot 2024-03-22 at 9 49 37 AM