How to use the redux-devtools-core/lib/utils/filters.getLocalFilter function in redux-devtools-core

To help you get started, we’ve selected a few redux-devtools-core 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 zalmoxisus / remote-redux-devtools / src / devTools.js View on Github external
init(options) {
    this.instanceName = options.name;
    this.appInstanceId = getRandomId();
    const { blacklist, whitelist } = options.filters || {};
    this.filters = getLocalFilter({
      actionsBlacklist: blacklist || options.actionsBlacklist,
      actionsWhitelist: whitelist || options.actionsWhitelist
    });
    if (options.port) {
      this.socketOptions = {
        port: options.port,
        hostname: options.hostname || 'localhost',
        secure: options.secure
      };
    } else this.socketOptions = defaultSocketOptions;

    this.suppressConnectErrors = options.suppressConnectErrors !== undefined ? options.suppressConnectErrors : true;

    this.startOn = str2array(options.startOn);
    this.stopOn = str2array(options.stopOn);
    this.sendOn = str2array(options.sendOn);
github jhen0409 / react-native-debugger / app / worker / reduxAPI.js View on Github external
return next => (reducer, initialState) => {
    const store = configureStore(next, monitorReducer, {
      maxAge,
      shouldCatchErrors,
      shouldHotReload,
      shouldRecordChanges,
      shouldStartLocked,
      pauseActionType,
    })(reducer, initialState);

    instances[id] = {
      name: name || id,
      id,
      store,
      filters: getLocalFilter({
        actionsWhitelist: (filters && filters.whitelist) || actionsWhitelist,
        actionsBlacklist: (filters && filters.blacklist) || actionsBlacklist,
      }),
      actionCreators: actionCreators && (() => getActionsArray(actionCreators)),
      stateSanitizer,
      actionSanitizer,
      deserializeState,
      deserializeAction,
      serializeState,
      serializeAction,
      serialize,
      predicate,
    };

    start(instances[id]);
    store.subscribe(() => {