-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Programmatically set default state of graph, logs, & updates on render #27
Comments
This is the workaround I've written for now to have the logs and updates always enabled. if (window.env === 'development') {
window.localStorage.setItem('mobx-react-devtool__updatesEnabled', 'YES')
window.localStorage.setItem('mobx-react-devtool__logEnabled', 'YES')
return <DevTools />
} |
@jennifer-mann, you can now do it like this: import { setLogEnabled, setUpdatesEnabled, setGraphEnabled } from 'mobx-react-devtools';
setLogEnabled(true);
setUpdatesEnabled(false);
setGraphEnabled(false); Published as [email protected] |
I'm planning to get rid of necessity to include |
thanks 👍 |
@andykog I don't see There's |
@alexilyaev, enables the second button on the panel, kind of useless. |
I would like a way to automatically set the state of the dev tools on render. Something like:
I basically always want the logs to be on when I'm in my dev environment. This wouldn't normally be a big problem (you just click the button and be done with it), but my app is rendering inside of an iframe inside another application which makes a page refresh clear the active state of the mobx-react-devtools on every refresh.
I know that I could just build my own custom panel design and hook into the active state of each button, but that's a lot more work than I'm hoping to do to just turn one on/off statically.
The text was updated successfully, but these errors were encountered: