Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of cleanup function #323

Open
mwskwong opened this issue Jul 31, 2022 · 2 comments
Open

Lack of cleanup function #323

mwskwong opened this issue Jul 31, 2022 · 2 comments

Comments

@mwskwong
Copy link

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.

@mwskwong
Copy link
Author

It seems that there isn't much progress to it.
It could be a problem when the component is re-rendered

@jacoblockett
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants