# UI Kit not working after switching between Tabs

**URL:** <https://devforum.zoom.us/t/ui-kit-not-working-after-switching-between-tabs/114544>\
**Category:** UI ToolKit\
**Created:** [July 29, 2024, 3:43am UTC](https://devforum.zoom.us/t/ui-kit-not-working-after-switching-between-tabs/114544 "2024-07-29T03:43:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gireesh.ks](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gireesh.ks/32/48293_2.png) [@gireesh.ks](https://devforum.zoom.us/u/gireesh.ks)\
**Post date:** [July 29, 2024, 3:43am UTC](https://devforum.zoom.us/t/ui-kit-not-working-after-switching-between-tabs/114544/1 "2024-07-29T03:43:50Z")

</div>

I have 2 tabs in my application 1st tab calling the UI kit. Once I move to next tab and come back to the Video call page it is not loading. First time it is working next time it is not working .

var sessionContainer  
var authEndpoint = ‘’  
var role = 1  
useEffect(() =\> {  
var config = {  
videoSDKJWT: “eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBfa2V5IjoiTVZZSnEtZlNTX3Vpak50VDFqTmtJdyIsInJvbGVfdHlwZSI6MSwidHBjIjoicXpBQ255dFF3UlRIRXRSd1BSMGoxNzIyMDg3ODQxMzk4IiwiZ2VvX3JlZ2lvbnMiOiJVUyxBVSxDQSxJTixDTixCUixNWCxISyxTRyxKUCxERSxOTCIsInNlc3Npb25fa2V5IjoiQ29uc3VsdGF0aW9uIiwiZXhwIjoxNzIyMDkzMjQxLCJ2ZXJzaW9uIjoxLCJpYXQiOjE3MjIwODc4NDF9.Bm8\_Cdbv5coiF8ZCO5-LF7CFtO8fibfaNHunp6EkmtE”,  
sessionName: “qzACnytQwRTHEtRwPR0j1722087841398”,  
userName: ‘React’,  
sessionPasscode: ‘’,  
features: [‘video’, ‘audio’, ‘settings’, ‘users’, ‘chat’, ‘share’]  
};  
sessionContainer = document.getElementById(‘sessionContainer’)  
uitoolkit.joinSession(sessionContainer, config)  
uitoolkit.onSessionClosed(sessionClosed)  
//joinSession()  
});  
var sessionClosed = (() =\> {  
console.log(‘session closed’)  
uitoolkit.closeSession(sessionContainer)  
document.getElementById(‘join-flow’).style.display = ‘block’  
})  
var sessionJoined = (() =\> {  
console.info(‘session joined’)  
})  
return (

  
  

  

# Zoom Video SDK Sample React
  

User interface offered by the Video SDK UI Toolkit

  
Join Session  

  

  
  

  
);  
This the code snippet

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [August 8, 2024, 12:10pm UTC](https://devforum.zoom.us/t/ui-kit-not-working-after-switching-between-tabs/114544/2 "2024-08-08T12:10:04Z")

</div>

Can you share more details: Are you seeing any errors? Do you have any message in the console?

Is it possible when you’re changing tabs your component is being re-rendered causing the useEffect to trigger again? I see in your code snippet the useEffect does not have a dependency array, can you try adding an empty array as the second arguement:

```js
useEffect(() => {
// your code
}, [])

```

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 10, 2025, 7:16pm UTC](https://devforum.zoom.us/t/ui-kit-not-working-after-switching-between-tabs/114544/3 "2025-02-10T19:16:24Z")

</div>

Hey @gireesh.ks ,

We cannot reproduce this issue. Here is a sample you can use to verify: [Zoom Video SDK UI toolkit](https://videosdk.dev/uitoolkit/)

> **[GitHub - zoom/videosdk-ui-toolkit-react-sample: Use the Zoom Video SDK UI Toolkit in React](https://github.com/zoom/videosdk-ui-toolkit-react-sample)**
>
> Use the Zoom Video SDK UI Toolkit in React

Best,  
Tommy
