redux-utilities/redux-actions

Match updated Observer interface

Open

#30 aperta il 17 set 2015

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)JavaScript (340 fork)batch import
help wanted

Metriche repository

Star
 (6540 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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);
});

Guida contributor