How to use the redux-devtools-core/lib/utils/filters.filterState 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
relay(type, state, action, nextActionId) {
    const message = {
      type,
      id: this.socket.id,
      name: this.instanceName,
      instanceId: this.appInstanceId,
    };
    if (state) {
      message.payload = type === 'ERROR' ? state :
        stringify(filterState(state, type, this.filters, this.stateSanitizer, this.actionSanitizer, nextActionId));
    }
    if (type === 'ACTION') {
      message.action = stringify(
        !this.actionSanitizer ? action : this.actionSanitizer(action.action, nextActionId - 1)
      );
      message.isExcess = this.isExcess;
      message.nextActionId = nextActionId;
    } else if (action) {
      message.action = action;
    }
    this.socket.emit(this.socket.id ? 'log' : 'log-noid', message);
  }
github jhen0409 / react-native-debugger / app / worker / reduxAPI.js View on Github external
actionSanitizer,
    serializeState,
    serializeAction,
  } = instance;

  const message = {
    type,
    id: instance.id,
    name: instance.name,
  };
  if (state) {
    message.payload =
      type === 'ERROR'
        ? state
        : stringify(
          filterState(
            state,
            type,
            filters,
            stateSanitizer,
            actionSanitizer,
            nextActionId,
            predicate
          ),
          serializeState
        );
  }
  if (type === 'ACTION') {
    message.action = stringify(
      !actionSanitizer ? action : actionSanitizer(action.action, nextActionId - 1),
      serializeAction
    );