Skip to content

v1.0.0

Compare
Choose a tag to compare
@tomkis tomkis released this 24 Mar 12:40
· 14 commits to master since this release

This is a production 1.0 release:

Merged #12:

  • Reduces API surface area
  • Presents sideEffect abstraction

Breaking change

It's no longer possible to yield function as side effect within reducer, now it's mandatory to use declarative effects:

Instead of:

function* reducer(appState, action) {
  yield dispatch => console.log('side effect capable of dispatching new action');
  return appState;
}

you'd have to:

import { sideEffect } from 'redux-side-effects';

const loggingEffect = (dispatch, message) => console.log(message);

function* reducer(appState, action) {
  yield sideEffect(loggingEffect, 'side effect capable of dispatching new action');
  return appState;
}