typeit-react
typeit-react copied to clipboard
Reset is not resetting strings
Hi @alexmacarthur,
I'm trying to do a multilingual website with a cool animated title (with typeit-react!).
But when I change the state of the TypeIt component, it retypes the previous values as well and chains them!
Here is the minimal bug reproduction: https://codesandbox.io/s/peaceful-sunset-i2eve?file=/src/App.js
Or maybe there is a smarter way to build this.
Turns out, I found a work-around. I simply display the type-it component
only on the first render and then display then display plain text
: https://codesandbox.io/s/gifted-galois-5gndv?file=/src/App.js
Here is the result in action: https://codeforfaith.com/
@rildev Thanks for reporting that issue and glad you found a workaround! I haven't had a chance to dig into anything myself yet, but will bump a version if needed when I have some time.