I'm developing a react app written with typescript, and I'm trying to give the best use of your SDK.
I would like to understand better how and when to use the destroy() method on a frontend app, is it only when the website is closed that we should call the destroy method, or at all times, lets say in our componentWillUnmount method? I'm really struggling with this since I'm trying to not leave any client connections opened behind but when I use this methods, lets say on componentWillUnmount I don't get to use the client at all anywhere in the code. Can you shed some light on this matter please?
Please sign in to leave a comment.