Created
July 11, 2021 00:16
-
-
Save peterwiebe/9f41d292cf61dda53900a58a11558f14 to your computer and use it in GitHub Desktop.
react-native-typewriter change direction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import TypeWriter from 'react-native-typewriter'; | |
const App = () => { | |
const [isDeleting, setIsDeleting] = React.useState(false) | |
const handleAnimationEnd = () => { | |
setIsDeleting(true) | |
} | |
return ( | |
<TypeWriter typing={isDeleting ? -1 : 1} onTypingEnd={handleAnimationEnd}> | |
<Text>Fun With Flags</Text> | |
</TypeWriter> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment