How to use the redux-devtools-extension/logOnlyInProduction.devToolsEnhancer function in redux-devtools-extension

To help you get started, we’ve selected a few redux-devtools-extension examples, based on popular ways it is used in public projects.

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

github sensu / sensu-go / dashboard / src / store / createStore.js View on Github external
function createStore(reducer) {
  const enhancer = compose(
    applyMiddleware(
      thunkMiddleware,
      ...(process.env.NODE_ENV === "production"
        ? // eslint-disable-next-line global-require
          [require("redux-freeze")]
        : []),
    ),
    persistToLocalStorage("theme"),
    devToolsEnhancer({ title: "Sensu Web UI" }),
  );

  return create(reducer, enhancer);
}
github Festify / app / src / store.ts View on Github external
middleware as routerMiddleware,
    reducer as routerReducer,
} from './routing';
import sagas from './sagas';

const saga = createSagaMiddleware();

export const store = createStore(
    combineReducers({
        ...reducers,
        router: routerReducer,
    }),
    compose(
        routerEnhancer,
        applyMiddleware(routerMiddleware, saga),
        devToolsEnhancer({}),
    ),
);

for (const s of sagas) {
    saga.run(s);
}

store.dispatch(generateInstanceId());
store.dispatch(initializeCurrentLocation(store.getState().router));
window.onSpotifyWebPlaybackSDKReady = () => {
    store.dispatch(spotifySdkInitFinish());
};
github oliverjam / bookmarkd / src / index.js View on Github external
import thunk from 'redux-thunk';

import { offline } from 'redux-offline';
import offlineConfig from 'redux-offline/lib/defaults';
import { devToolsEnhancer } from 'redux-devtools-extension/logOnlyInProduction';

import rootReducer from './reducers';
import App from './components/App';
import defaultState from './defaultState.js';

const middleware = [thunk, promiseMiddleware];

const enhancer = compose(
  applyMiddleware(...middleware),
  devToolsEnhancer(),
  offline(offlineConfig)
);

const store = createStore(rootReducer, defaultState, enhancer);

ReactDOM.render(
  
    
  ,
  document.getElementById('root')
);