-
Notifications
You must be signed in to change notification settings - Fork 330
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
Unmount usage in React #353
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using p2 in a React component. I want to ensure that when the component unmounts that the p2 instance is no longer running.
Aside from removing event listeners and cancelling the requestAnimationFrame loop, is there anything specific that needs to be called to tell p2 that it's done? Something like a destroy() method?
I've noticed p2 has a method called "clear" - is this what I'm after?
The text was updated successfully, but these errors were encountered: