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

Question about React.js component unmounting #3

Closed
dlaynes opened this issue Nov 16, 2017 · 1 comment
Closed

Question about React.js component unmounting #3

dlaynes opened this issue Nov 16, 2017 · 1 comment

Comments

@dlaynes
Copy link

dlaynes commented Nov 16, 2017

Does Talk.js provide a destroy(), unload(), or similar function?
In SPAs, sometimes the same page is loaded more than once, and I want to prevent possible memory leaks:
https://reactjs.org/docs/integrating-with-other-libraries.html

Example of what I think would happen:
facebook/react#7128

Thanks

@dlaynes dlaynes changed the title Question about component unmounting Question about React.js component unmounting Nov 16, 2017
@eteeselink
Copy link
Contributor

Hi @dlaynes sorry for the late response!

This is a very good point, and it's missing in the example. Fortunately, we do have a destroy function: https://talkjs.com/docs/api/classes/inbox.html#destroy

That ought to go in the componentWillUnmount, we'll update the example. Thanks for pointing this out!

@batuhan batuhan closed this as completed Jan 9, 2018
csmeyns pushed a commit that referenced this issue Aug 15, 2024
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

3 participants