# In-client Experience The Zoom Apps SDK enables you to control the interaction between the app and the Zoom client. ## Maintaining state outside of a meeting In order to maintain state after a meeting, the instance of the app that is running in the meeting must communicate with the instance of the app running in the main client. ## Basic Usage ### To connect the two app instances, use: ```javascript await zoomSdk.addEventListener("onConnect", (eventInfo) => {}); await zoomSdk.connect(); ``` ### To send state updates between the two app instances as needed for the apps functionality, use: ```javascript await zoomSdk.addEventListener("onMessage", (eventInfo) => {}); await zoomSdk.postMessage(); ``` ### When the meeting is closing, update the state one more time and close the connection using: ```javascript await zoomSdk.addEventListener("onMeeting", (eventInfo) => { if (event.action == 'ended'){ await zoomSdk.postMessage(), {exampleData: "some data to sync"}; await zoomSdk.endSyncData(), {}; } }); ```