Created
September 9, 2020 21:25
-
-
Save kimberleehowley/490f0fb4aa2d2fa1b7f068410ff482a1 to your computer and use it in GitHub Desktop.
Sample code for leaving a Daily video call In a React app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In App.js | |
/** | |
* Starts leaving the current call. | |
*/ | |
const startLeavingCall = useCallback(() => { | |
if (!callObject) return; | |
// update component state to a "leaving" state... | |
callObject.leave(); | |
}, [callObject]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment