This is rather a smaller release, but some things have changed or got improved.
Added:
- new
rootSagaStarted
hook for saga monitor
Changed:
- we reverted changing effect types to Symbols, this previous change has caused some problems and we came to conclusion that strings are "good enough" for us
detach
helper returns a new effect instead of mutating the input one- we suspend the scheduler before running a root saga, so it should behave the same as forked sagas in terms of scheduling
Removed:
asEffect
, it shouldn't be used, effect types are public, effect shapes are stable, so if for whatever reason you want to do some effect inspection you can just check them without us providing additional helpers for it
Fixed:
- we have stopped interpreting effects returned from
fork
, this shouldn't affect any real-life code, affected patterns look like thisfork(() => effectCreator())
andfork(takeEvery, 'type', fn)
- small memory leak for closed
actionChannel
s
Polished:
- added dev warning about dispatching frozen actions, for scheduling purposes we are using
Object.defineProperty
on actions dispatched withput
effect, so we have to be able to mutate the action object - added dev warning about using async generators, they are not supported by
redux-saga
- we are reusing
@babel/runtime
helpers, this has helped us to remove some bytes from our bundles - CommonJS entries are proxied now. This means that
process.env.NODE_ENV
is read only once and based on that value the appropriate bundle (development or production) is loaded conditionally withrequire
.process.env
is slow in node.js so this should improve performance a little bit.