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

Component doesn't render new `useAnimatedProps`

Open vladyslavNiemtsev opened this issue 2 years ago • 5 comments

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 avatar May 22 '22 12:05 vladyslavNiemtsev

Maybe related issue:

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

vladyslavNiemtsev avatar May 22 '22 12:05 vladyslavNiemtsev

By the way:

  • fresh SharedValue comes every time in useAnimatedProps hook.
  • There are the same problem with styles which calculated with useAnimatedStyles hook and passed to this component.

Thanks!

vladyslavNiemtsev avatar May 22 '22 12:05 vladyslavNiemtsev

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.

mBarlescu avatar Jun 21 '22 10:06 mBarlescu

@mBarlescu Hi!

I just changed values with setTimeout with 0 timer

vladyslavNiemtsev avatar Jun 27 '22 06:06 vladyslavNiemtsev

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

gilons avatar Mar 22 '24 08:03 gilons