Skip to content

Instantly share code, notes, and snippets.

@peterwiebe
Created July 11, 2021 00:16
Show Gist options
  • Save peterwiebe/9f41d292cf61dda53900a58a11558f14 to your computer and use it in GitHub Desktop.
Save peterwiebe/9f41d292cf61dda53900a58a11558f14 to your computer and use it in GitHub Desktop.
react-native-typewriter change direction
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