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

Unreachable code in useTelnyxRTC #394

Open
rnbrady opened this issue Nov 6, 2024 · 1 comment
Open

Unreachable code in useTelnyxRTC #394

rnbrady opened this issue Nov 6, 2024 · 1 comment
Assignees

Comments

@rnbrady
Copy link

rnbrady commented Nov 6, 2024

In the implementation here the client variable will always be undefined and the cleanup block will never run.

Consider combining useState with useEffect which will allow cleanup on dep change.

@farhat-ha farhat-ha self-assigned this Nov 7, 2024
@rnbrady
Copy link
Author

rnbrady commented Nov 9, 2024

Having worked with the SDK a bit more, I had some ideas for a hook which I've published at rnbrady/telnyx-use-phone.

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

No branches or pull requests

2 participants