redux-utilities/redux-actions

Match updated Observer interface

Open

#30 geöffnet am 17. Sept. 2015

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (340 Forks)batch import
help wanted

Repository-Metriken

Stars
 (6.540 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

https://github.com/zenparsing/es-observable#observer

interface Observer {

    // Recieves the next value in the sequence
    next(value);

    // Recieves the sequence error
    error(errorValue);

    // Receives the sequence completion value
    complete(completeValue);
}

handleAction() / handleActions() should use the same naming scheme:

const reducer = handleAction(ACITON_TYPE, {
  // Receives normal actions
  next(state, action);

  // Receives `error: true` actions
  error(state, action);

  // Receives `meta.sequence: 'complete'` actions
  complete(state, action);
});

Contributor Guide