# Disable zoom web sdk when condition

**URL:** <https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613>\
**Category:** Web\
**Created:** [June 16, 2021, 11:16pm UTC](https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613 "2021-06-16T23:16:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luucaford](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/luucaford/32/28332_2.png) [@luucaford](https://devforum.zoom.us/u/luucaford)\
**Post date:** [June 16, 2021, 11:16pm UTC](https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613/1 "2021-06-16T23:16:34Z")

</div>

**Description**  
Hey! how are you?  
Is it possible to hide/disable/unmount the web sdk script if “x” condition?. When I integrate ZoomMtg.preLoadWasm - ZoomMtg.prepareJssdk functions anywhere in my code it puts the div id=“zmmtg-root” in the body as soon as my App starts (doesn’t matter if the code is in some random component that isn’t mounted), but when it comes to mobile browsers i want to unmount it because it breaks my whole CSS.

**Error**  
Web SDK brokes my CSS. I understand that is what it is so i want to hide it when it comes to mobile users.

**Which Web Client SDK version?**  
1.9.6

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Install @zoomus/websdk
2. Add ZoomMtg.preLoadWasm() or ZoomMtg.prepareJssdk() in an unreachable code or try to disable it
3. the sdk will appear

**Screenshots**  
For example. I put the preLoader in an unreachable code and it triggers anyways.  
 ![Captura de Pantalla 2021-06-16 a la(s) 20.13.46](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/7/d741348e1b7f8380e1900555bcf556ad274ffd31.png)  
If a comment this code the App works as if not there, but i can’t understand why i can’t shut it down if i want to. Is it possible?

**Device (please complete the following information):**

- Browser: Chrome Versión 91.0.4472.77 (Build oficial) (x86\_64)

**Additional context**  
I am trying to use it with React.js.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 18, 2021, 5:36am UTC](https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613/2 "2021-06-18T05:36:05Z")

</div>

Hey @luucaford,

Thank you for reaching out to the Zoom Developer Forum. I think that you’re seeing this issue because the dependencies are still imported on the page.

Try conditionally importing the Zoom Web SDK:

> <https://stackoverflow.com/questions/36367532/how-can-i-conditionally-import-an-es6-module>

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![luucaford](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/luucaford/32/28332_2.png) [@luucaford](https://devforum.zoom.us/u/luucaford)\
**Post date:** [June 21, 2021, 3:56pm UTC](https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613/3 "2021-06-21T15:56:25Z")

</div>

It’s working!  
Thanks

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 21, 2021, 8:20pm UTC](https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613/4 "2021-06-21T20:20:37Z")

</div>

Awesome! Glad to hear it. I’ll go ahead and close this topic now but feel free to open a new topic if you encounter any further issues or questions.

Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 21, 2021, 8:20pm UTC](https://devforum.zoom.us/t/disable-zoom-web-sdk-when-condition/52613/5 "2021-06-21T20:20:40Z")

</div>

Closed on June 21, 2021, 8:20pm UTC


