10 examples of 'redux devtools chrome' in JavaScript

Every line of 'redux devtools chrome' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
40function showDevTools() {
41 getNWWindow().showDevTools();
42}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

60devtools() {
61 const win = this.electron.remote.getCurrentWindow();
62 win.webContents.openDevTools();
63}
6function withDevTools(middleware) {
7 const devTools = window.devToolsExtension
8 ? window.devToolsExtension()
9 : require('../containers/DevTools').instrument();
10 return compose(middleware, devTools);
11}
176setupDevTools() {
177 if (PLATFORM.global.devToolsExtension) {
178 this.logger[getLogType(this.options, "devToolsStatus", LogLevel.debug)]("DevTools are available");
179 this.devToolsAvailable = true;
180 this.devTools = PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions);
181 this.devTools.init(this.initialState);
182 this.devTools.subscribe((message) => {
183 this.logger[getLogType(this.options, "devToolsStatus", LogLevel.debug)](`DevTools sent change ${message.type}`);
184 if (message.type === "DISPATCH") {
185 this._state.next(JSON.parse(message.state));
186 }
187 });
188 }
189}
26function ReduxDevToolsFactory(): boolean {
27 const reduxDevTools = new ReduxDevTools();
28 window[ReduxDevToolsName] = reduxDevTools;
29 return reduxDevTools.IsEnabled;
30}
13function getDevTools(): DevInterface | undefined {
14 const w = window as Window & { __xstate__?: DevInterface };
15 if (!!w.__xstate__) {
16 return w.__xstate__;
17 }
18
19 return undefined;
20}
14function getStoreAndDevTools(props) {
15 const {observable, hydrate, serialize, enhancers, children} = props;
16 for (let i = 0; i < devtoolRegistry.length; i++) {
17 let registration = devtoolRegistry[i];
18 // one observable can only have 1 devtool enabled
19 if (registration.observable == observable) {
20 return registration.result;
21 }
22 }
23 const ReduxDevTools = createDevTools(
24 <MobXMonitor {...{hydrate, observable}}>
25 {children}
26 </MobXMonitor>
27 );
28 const enhancer = compose.apply(this, [ReduxDevTools.instrument()].concat(enhancers))
29 const store = createStore(function (state={}, action) {
30 if (action.type != ActionTypes.MOBX_UPDATE) return state;
31 return action.state
32 }, serialize(observable), enhancer);
33 reaction(() => serialize(observable), state => {
34 if (observable.$mobx.fromJS) {
35 observable.$mobx.fromJS = false;
36 return;
37 }
38 store.dispatch({type: ActionTypes.MOBX_UPDATE, state})
39 });
40 const result = [store, ReduxDevTools];
41 devtoolRegistry.push({result, observable});
42 return result
43};
149function closeDevTools(){ _(this).closeDevTools(); return this; },
54get devtools () {
55 return this.values.devtools
56}
160static setCurrentDevTools(current) {
161 window.localStorage.setItem('currentDevTools', current);
162}

Related snippets