typeit
typeit copied to clipboard
Lack of cleanup function
Currenet behavior
There isn't a function that terminates the animation, destroys the TypeItInstance
, and resets everything.
The closest things are reset()
and destroy()
, but none of the two are doing actual cleanup work once and for all.
Expected behavior
A new API, or even replacing destroy()
should be introduced for doing proper cleanup work.
It seems that there isn't much progress to it. It could be a problem when the component is re-rendered
It seems that there isn't much progress to it. It could be a problem when the component is re-rendered
Same as you, I was having an issue where destroy()
wouldn't actually kill the animation in time and would continue to run in the background. It was a super inconsistent bug to reproduce. I was able to use a combo of
typeit.freeze()
typeit.destroy()
to kill the animation entirely. Hope it help anyone how comes here for a similar bug.
Would be nice to have a function .kill()
or .terminate
or whatever that accomplishes whatever this workaround does.