Closed VincentQuillien closed 3 years ago
Oh no 😅 Would https://github.com/axelra-ag/react-native-animateable-text be a suitable alternative for now? (cc @JonnyBurger)
Yes I'll replace my instances of ReText with AnimateableText, thanks @JonnyBurger !
It's pity, but neither retext or animateable-text do not work with Russian symbols :(
I've tried it only on android emulator with animateable-text 0.5.9
const animatedText = useDerivedValue(
() => `использовать ${value.value} бонусов test`,
)
const animatedProps = useAnimatedProps(() => {
return {
text: animatedText.value,
}
})
I think this is a bug in Reanimated (or even RN possibly). I have opened an issue here: https://github.com/software-mansion/react-native-reanimated/issues/1782
The issue is also reproducible without ReText and also happens in my react-native-animteable-text component.
However, I have found a workaround: It works if you don't wrap the text in a shared value and use it in useAnimatedProps
directly.
Notice how in the following example one way works and one don't. If you rearchitect it a bit I'm sure you can make it work.
import React from 'react';
import {TextInput} from 'react-native';
import Animated, {
useAnimatedProps,
useSharedValue,
} from 'react-native-reanimated';
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
const value = 'ööö';
export const Repro = () => {
const sharedValue = useSharedValue(value);
const animatedProps = useAnimatedProps(() => {
return {value: `${value} ${sharedValue.value}`};
}, []);
return <AnimatedTextInput animatedProps={animatedProps} />;
};
// Result: ööö ööö
I think this issue can be closed as there is nothing that can be done in this repo.
We have PR ready to merge fix in Reanimated: https://github.com/software-mansion/react-native-reanimated/pull/1784
Looks like it is merged?
Yes, fixed in newest Reanimated version 👍🏼 one to close @wcandillon 🙌🏼
Hi !
It seems ReText cannot render unicode characters on Android, I've tried both device and simulator and with different fonts.
Works fine on iOS.