Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Nov 16, 2020
1 parent 75b81ae commit b77cad7
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# react-native-animateable-text

<Text> that supports animated value
A `<Text/>` component that supports an Animated Value as text!

## Usage (Reanimated 2)

```tsx
import AnimateableText from 'react-native-animateable-text';

const Example: React.FC = () => {
const text = useSharedValue('World');

const animatedText = useDerivedValue(() => `Hello ${text.value}`);
const animatedProps = useAnimatedProps(() => {
return {
text: animatedText.value,
};
});

return (
<AnimateableText
text={animatedText}
// same other props as Text component
/>;
};
```
<img src="https://user-images.githubusercontent.com/1629785/99287990-458d4600-283b-11eb-8d5e-0c1129189c89.gif">
Expand Down

0 comments on commit b77cad7

Please sign in to comment.