Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample code for leaving a Daily video call In a React app
// 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