How to use the redux-devtools-core/lib/utils.getActionsArray 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 jhen0409 / react-native-debugger / app / worker / remotedev.js View on Github external
export function connect(options = {}) {
  const id = generateId(options.instanceId);
  const opts = {
    ...options,
    instanceId: id,
    name: options.name || id,
    actionCreators: JSON.stringify(getActionsArray(options.actionCreators || {})),
  };
  start();
  return {
    init(state, action) {
      send(action || {}, state, 'INIT', opts);
    },
    subscribe(listener) {
      if (!listener) return undefined;
      if (!listeners[id]) listeners[id] = [];
      listeners[id].push(listener);

      return function unsubscribe() {
        const index = listeners[id].indexOf(listener);
        listeners[id].splice(index, 1);
      };
    },
github zalmoxisus / remote-redux-devtools / src / devTools.js View on Github external
    if (options.actionCreators) this.actionCreators = () => getActionsArray(options.actionCreators);
    this.stateSanitizer = options.stateSanitizer;
github jhen0409 / react-native-debugger / app / worker / reduxAPI.js View on Github external
      actionCreators: actionCreators && (() => getActionsArray(actionCreators)),
      stateSanitizer,