Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable ability to use devtools? #51

Open
fnpen opened this issue Mar 7, 2019 · 1 comment
Open

How to disable ability to use devtools? #51

fnpen opened this issue Mar 7, 2019 · 1 comment
Labels

Comments

@fnpen
Copy link

fnpen commented Mar 7, 2019

I can disable react-devtools with code like this:

for (const prop in window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
    window.__REACT_DEVTOOLS_GLOBAL_HOOK__[prop] = isFunction(
      window.__REACT_DEVTOOLS_GLOBAL_HOOK__[prop]
    )
      ? () => ()
      : null;
  }

Do you know the ability to disable mobx-devtools extension for production?
I do not want to give the ability for clients to see my data.

@andykog
Copy link
Member

andykog commented Mar 10, 2019

Well. you can try the same with __MOBX_DEVTOOLS_GLOBAL_HOOK__.
If it's possible to run some code before loading mobx, then delete window.__MOBX_DEVTOOLS_GLOBAL_HOOK__ should be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants