How to use redux-devtools-instrument - 8 common examples

To help you get started, we’ve selected a few redux-devtools-instrument 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 redux-offline / redux-offline / src / __tests__ / index.js View on Github external
test("works with devtools store enhancer", () => {
  const monitorReducer = state => state;
  const store = createStore(
    defaultReducer,
    compose(offline(defaultConfig), instrument(monitorReducer))
  );

  expect(() => {
    store.dispatch({ type: "SOME_ACTION" });
  }).not.toThrow();
});
github mattkrick / redux-optimistic-ui / __tests__ / index-tests.js View on Github external
test('works with preloadState and redux-devtools-instrumentation', t => {
  const enhancedReducer = combineReducers({
    counter: optimistic(counterReducer)
  });
  try {
    const store = createStore(enhancedReducer, {
      counter: 1
    }, instrument((state, action) => state));
    store.dispatch({type: 'INC'});
    t.is(ensureState(store.getState().counter), 2);
  } catch (error) {
    t.fail(error.message)
  }
});
github zalmoxisus / redux-devtools-extension / src / app / stores / enhancerStore.js View on Github external
export default function configureStore(next, monitorReducer, config) {
  return compose(
    instrument(
      monitorReducer,
      {
        maxAge: config.maxAge || window.devToolsOptions.maxAge || 50,
        stringifyActionTypes: !config.serialize,
        shouldCatchErrors: config.shouldCatchErrors || window.shouldCatchErrors,
        shouldHotReload: config.shouldHotReload,
        shouldRecordChanges: config.shouldRecordChanges,
        shouldStartLocked: config.shouldStartLocked,
        pauseActionType: config.pauseActionType || '@@PAUSED'
      }
    ),
    persistState(
      getUrlParam('debug_session'),
      config.deserializeState,
      config.deserializeAction
    )
github reduxjs / redux-devtools / packages / redux-devtools / src / createDevTools.js View on Github external
    static instrument = (options) => instrument(
      (state, action) => Monitor.update(monitorProps, state, action),
      options
    );
github zalmoxisus / redux-devtools-extension / src / app / stores / enhancerStore.js View on Github external
export default function configureStore(next, monitorReducer, config) {
  return compose(
    instrument(
      monitorReducer,
      {
        maxAge: config.maxAge,
        shouldCatchErrors: config.shouldCatchErrors || window.shouldCatchErrors,
        shouldHotReload: config.shouldHotReload,
        shouldRecordChanges: config.shouldRecordChanges,
        shouldStartLocked: config.shouldStartLocked,
        pauseActionType: config.pauseActionType || '@@PAUSED'
      }
    ),
    persistState(
      getUrlParam('debug_session'),
      config.deserializeState,
      config.deserializeAction
    )
  )(next);
github jhen0409 / react-native-debugger / app / worker / reduxAPI.js View on Github external
function configureStore(next, subscriber, options) {
  return instrument(subscriber, options)(next);
}
github zalmoxisus / remote-redux-devtools / src / configureStore.js View on Github external
export default function configureStore(next, subscriber, options) {
  return instrument(subscriber, options)(next);
}
github ucscXena / ucsc-xena-client / js / redux-devtool-shim.js View on Github external
module.exports = {
	ActionCreators: require('redux-devtools-instrument').ActionCreators
};

redux-devtools-instrument

Redux DevTools instrumentation

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis

Popular redux-devtools-instrument functions