Redash
  • Redash
  • Animations
  • Coordinates
  • Math
  • Strings
  • Transitions
  • Vectors
  • Paths
  • Physics
  • Colors
Powered by GitBook
On this page

Was this helpful?

Strings

<ReText />

This component is like <Text> but accepts a string animation node as property. Behind the scene, <ReText> is using <TextInput> with some default styling. Therefore there might be some slight inconsistencies with <Text>.

() => {
  const price = useSharedValue(42);
  const formattedPrice = useDerivedValue(() => (`${price.value}`.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' })));
  return (
    <ReText
      text={formattedPrice}
      style={{ color: "black", fontVariant: ["tabular-nums"] }}
    />
  )
}
PreviousMathNextTransitions

Last updated 4 years ago

Was this helpful?