2.0.0 (2021-06-24)
2.0.0 brings support for RxJS v7, newer TypeScript support, and a few bug fixes (see previous pre-releases.) Of note is BREAKING CHANGE that action$.ofType()
has been removed in favor of a pipeable operator you can import import { ofType } from 'redux-observable';
2.0.0-rc.2 (2021-05-11)
2.0.0-rc.1 (2021-05-07)
- types: Type system now requires ofType operator to have at least one action type passed in, fixes #689 (#690) (72182ec)
- ofType: Add warning for nullsy typescloses #607 (ecf3f21)
- rxjs7: add rxjs 7 compatibility (a4932a1), closes #735
- rxjs7: Uses typescript 4.2.2 and tslib 2.1.0 (same libs as rxjs 7). @typescript-eslint/eslint-plugin and @typescript-eslint/parser has been updated to 4.22.0 to run linter properly with new ts version, new troublesome linter rules added.
2.0.0-alpha.0 (2019-11-14)
-
ofType: Type inference for ofType, removal of ActionsObservable in favor of just Observable (#681) (16f083d)
-
Convert project to Typescript and add es2015 build target (#672) (ba4699e), closes #672
- ofType: ActionsObservable existed so we could provide an ofType() method to the prototype of action$, before RxJS had pipeable operators. Now that pipeable operators have been out for quite some time we are removing ActionsObservable in favor or using the pipeable ofType() instead.
// BEFORE
function someEpic(action$) {
return action$
.ofType('PING')
.mapTo({ type: 'PONG' });
}
// AFTER
import { ofType } from 'redux-observable';
import { mapTo } from 'rxjs/operators';
function someEpic(action$) {
return action$.pipe(
ofType('PING')
mapTo({ type: 'PONG' })
);
}
- the TS type definition for
combineEpics()
no longer accepts any unsafe overloads. Cast toany
if you need to provide unsafe/untyped Epics.
1.2.0 (2019-09-17)
- build: Internally, don't mix ES Module and CommonJS syntax for warning utilities so that Rollup builds don't require special handling of redux-observable. (#663) (376dc5b)
1.1.0 (2019-03-26)
- createEpicMiddleware: Don't share a scheduler queue with anyone else's RxJS code, fixes #624 (#625) (e5bae19)
1.0.0 (2018-06-21)
It's here! 1.0 brings support for RxJS v6 and Redux v4. To help migrate from pre-1.0 versions, we've written a migration guide to help you: https://redux-observable.js.org/MIGRATION.html
Is something missing from the migration guide? Let us know or make a PR!
- typings: Epic type parameter for State (third type param) now defaults to any instead of void (03e69cc)
1.0.0-beta.2 (2018-06-16)
- adapters: remove adapters support (87a5f86)
- adapters: Support for adapters has been removed. Adapters were previously used to transform the
action$
Observable into some other stream-library primitive; like Most.js, Bacon, RxJS v4, etc. While rarely used, if you would like this functionality the MIGRATION.md guide gives an example: https://redux-observable.js.org/MIGRATION.html#setting-up-the-middleware
1.0.0-beta.1 (2018-06-04)
- combineEpics: combineEpics no longer errors on React Native Android because of readonly
name
prop setting (7b4f208)
1.0.0-beta.0 (2018-06-01)
- state$: initial state is no longer skipped by state$ (2509605)
- rootEpic: an error is now thrown if you provide your root Epic directly to . See 'https://redux-observable.js.org/MIGRATION.html#setting-up-the-middleware' (4479ac8)
- state$: remove previously deprecated store.dispatch/getState() from epics (NOT from your UI code) (b352a98)
- state$: previously the second argument to your epics was a "lite" version of the redux store with store.dispatch() and store.getState(), however this has been replaced with a stream of a state$ in v1.0.0 of redux-observable and the old methods were deprecated with warnings in previous alpha versions. This release removes them entirely. See https://redux-observable.js.org/MIGRATION.html
1.0.0-alpha.3 (2018-06-01)
- combineEpics: verbose combineEpics returned function name (#480) (816a916)
- createEpicMiddleware: schedule emitted actions and epic subscription on the queueScheduler, so that epic order matters less (d3516bf)
- redux: update to redux v4 (#501) (43c2033)
- state$: state$ now only emits subsequent values if the state shallowly is different (e.g. prevValue !== nextValue). It still emits the current state immediately on subscribe regardless, as it did before, similar to BehaviorSubject. Closes #497 (4697047)
- typings: Make output actions optional (34a9e12)
- typings: Output actions should extend input actions. (d109077)
- typings: Updating typings for more common use-cases. (0b0efc0), closes #446
- redux: redux-observable now requires redux v4. The new version of redux is mostly the same, however it required us to change the
createEpicMiddleware
API. See https://redux-observable.js.org/MIGRATION.html - createEpicMiddleware: You must now provide your rootEpic to
epicMiddleware.run(rootEpic)
instead of passing it tocreateEpicMiddleware
. This fixes issues with redux v4 where it's no longer allowed to dispatch actions while middleware is still being setup. See https://redux-observable.js.org/MIGRATION.html - createEpicMiddleware:
epicMiddleware.replaceEpic
has been removed. A the equivilant behavior can be accomplished by dispatching your ownEND
action that your rootEpic is listening for with atakeUntil
, then providing the next rootEpic toepicMiddleware.run(nextRootEpic)
. See https://redux-observable.js.org/MIGRATION.html - createEpicMiddleware: Actions your epics emit are now scheduled using the queueScheduler. This is a bit hard to explain (and understand) but as the name suggests, a queue is used. If the queue is empty, the action is emitted as usual, but if that action causes other actions to be emitted they will be queued up until the call stack of the first action returns. In a large majority of cases this will have no perceivable impact, but it may affect the order of any complex epic-to-epic communication you have. The benefit is that actions which are emitted by an epic on start up are not missed by epics which come after it. e.g. With
combineEpics(epic1, epic2)
previously if epic1 emitted on startup, epic2 would not receive that action because it had not yet been set up. See https://redux-observable.js.org/MIGRATION.html
1.0.0-alpha.2 (2018-04-09)
- deps: gitbook-plugin-github is no longer listed as a normal dependency (it gets added automatically by gitbook even and I usually manually remove it, but it slipped in) (fabcded)
1.0.0-alpha.1 (2018-04-05)
1.0.0-alpha.0 (2018-04-04)
Early version alpha, breaking changes are still possible so use as your own risk and make sure to lockdown to exactly semver. Learn more about the migration: https://redux-observable.js.org/MIGRATION.html
- createEpicMiddleware: warn about reusing middleware (e72661a), closes #389
- state$: The second argument of an Epic is now a stream of state$, not a store (#410) (2ff3f6e), closes #56
0.19.0 (2018-06-06)
- errors: errors from reducers are no longer caught and logged, instead are rethrown. related #263#issuecomment-395109222 (f90f8ef), closes #issuecomment-395109222
- errors: For 0.19.0 errors from reducers are no longer caught and console.error logged, instead they are just rethrown as before. This was a temporary workaround for a bug in rxjs where it would silently swallow errors. That bug has been fixed in 5.5.6+, so it is highly recommended you use at least [email protected]+ with this version of redux-observable. However, redux-observable is close to reaching 1.0.0-final which will require rxjs v6 and redux v4, if you'd like to start upgrading to it now you can use redux-observable@next (as of this writing 1.0.0-beta.1)
0.18.0 (2018-02-07)
- Reducer errors: log exceptions thrown from
store.dispatch
inside the middleware (#379) (56c1903), closes #263 - typings: make lettable ofType correctly narrow action type (#385) (45d09a7), closes #382
- typings: More correct Epic and ofType type refinement for TypeScript users (#392) (#396) (63b2acc)
- typings: More correct ofType type refinement (#376) (e850c93), closes #375
- dependencies: Loosen peerDependencies (#359) (3140ac2), closes #358
- ofType:
ofType()
TypeScript overload that permits narrowing the filtered actions typeaction$.ofType<SomeNarrowAction>(someType);
(#312) (#370) (5b62ac5)
0.17.0 (2017-10-31)
- ofType: don't depend on letProto as it has issues in UMD builds (150c1d5)
- types: Add type for EPIC_END action type (#272) (5e98f2e), closes #271
- epics: calling
store.dispatch()
directly inside your epics is now deprecated and will be removed in v1.0.0 (#346 a1ba6a2, #336 76ecd33)
The ability to call store.dispatch()
inside your Epics was originally provided as an escape hatch, to be used rarely, if ever. Unfortunately in practice we've seen a large number of people using it extensively; there has even been popular tutorials teaching it as how you use redux-observable. Instead, Epics should emit actions through the Observable the Epic returns, using idiomatic RxJS.
const somethingEpic = (action$, store) =>
action$.ofType(SOMETHING)
.switchMap(() =>
ajax('/something')
.do(() => store.dispatch({ type: SOMETHING_ELSE }))
.map(response => ({ type: SUCCESS, response }))
);
const somethingEpic = action$ =>
action$.ofType(SOMETHING)
.switchMap(() =>
ajax('/something')
.mergeMap(response => Observable.of(
{ type: SOMETHING_ELSE },
{ type: SUCCESS, response }
))
);
store.dispatch
will be removed from Epics in v1.0.0 of redux-observable. This is unrelated to usage of store.dispatch
inside your UI components--you will continue to use it there
- ofType: Better support for redux-actions (#348) (c4d0ccf)
- ofType: expose ofType as lettable operator (#343) (fb4a5af), closes #186
0.16.0 (2017-08-16)
0.15.0 (2017-08-08)
- typings: Add dependencies to middleware options. (#207) (fb911a8)
- typings: dependencies type can now be anything, not just a POJO (70ded6d)
- typings: lift now uses correct return type, instead of (#208) (b4690bf), closes #187
0.14.0 (2017-03-02)
- build: es modules (#201) (c4318ec)
- dependencies: Added explicit dependencies option to createEpicMiddleware (#193) (7e2a479), closes #163
- rxjs: RxJS v5 non-beta (e.g. 5.1.0) is now required. Upgrading from rxjs 5 beta to latest should be easy in most cases.
0.13.0 (2017-01-20)
- typings: adds store type to Epic (#174) (ca4b163), closes #172
- typings: Enable second parameter for the createEpicMiddleware (25ac601)
- typings: TypeScript users only, the type interface for Epics now requires a second generic argument, your store's state interface.
interface Epic<ActionShape, StateShape>
. If you don't to strictly type your state, you can passany
0.12.2 (2016-11-18)
- ActionsObservable:
ActionsObservable.from()
now correctly returns an ActionsObservable as expected (#149) (fd393a1) - typings: Adds type definitions for ActionsObservable.from/of (0cba557)
0.12.1 (2016-10-04)
0.12.0 (2016-09-22)
- combineEpics: combineEpics() now transparently passes along any arguments, not just action$, store. (ee3efbf)
0.11.0 (2016-09-15)
- thunkservables: Removed support for thunkservables (e55428f)
- ActionsObservable.of: Added support for ActionsObservable.of(...actions) as shorthand, mostly useful for testing Epics (25f50d0), closes #98
- thunkservables: Support for thunkservables has been removed, replaced by Epics. You may now use redux-thunk in tandem with redux-observable. Read more
0.10.0 (2016-09-11)
- typings: TypeScript users: Added generics to createEpicMiddleware so developer defines what redux Actions look like (#105) (7b4214f). Previously, the behavior was rather restrictive so while it's unlikely going to break anyone's code, it technically is a breaking change.
0.9.1 (2016-08-17)
0.9.0 (2016-08-01)
- Adapters: Adds support for Epic input/output adapters. This allows us to support RxJS v4 via redux-observable-adapter-rxjs-v4 (#85) (a662cdf)
0.8.0 (2016-07-24)
- replaceEpic: Added middleware method to replace the root Epic. Useful for code splitting and hot reloading (a8f458d)
- replaceEpic: Dispatches an EPIC_END action when you replaceEpic() (#75) (fef6f80)
0.7.2 (2016-07-14)
- Typings: Correct that createEpicMiddleware() only accepts a single Epic (1d5e2ec)
0.7.1 (2016-07-14)
- TypeScript type definition: Add combineEpics(), provide more accurate type info for others (#70) (20da88c), closes #69
We have brand new docs! http://redux-observable.js.org/
- thunkservables: We are deprecating thunkservables in favor of the new process managers called "Epics". See http://redux-observable.js.org/docs/FAQ.html#why-were-thunkservables-deprecated for more information on Epics.
- API renames: Creating the middleware is now done with
createEpicMiddleware(rootEpic)
instead ofreduxObservable(rootEpic)
andcombineDelegators()
has been renamed ascombineEpics()
- middleware: dispatched actions will now occur before the actions created by synchronous observable side effects.
0.6.0 (2016-05-26)
- package: Add d.ts file to package. (fe8f073)
- combineEpics: add a method to combine different epics to make it easier to create a rootDelegator (da2eeaf)
- ofType: now accepts multiple types to filter for (9027d1c)
0.5.0 (2016-05-20)
- middleware processor: add argument to middleware to set up async processing for all actions pumped thr (5a672be)
- reduxObservable: allow async streams to emit other async actions, (94233f3), closes #8
- middleware processor: dispatched actions will now occur before the actions created by synchronous observable side effects.
0.4.0 (2016-05-12)
- actions: Wasn't actually emitting the correct actions to the actions Subject (a1cf32e)
- ofType: add operator to provided actions observable (174ceda)
0.3.0 (2016-05-12)
- naming: get rid of references to rxDucks missed during renaming (04c54c6)
0.1.0 (2016-04-29)
- async interop: can dispatch functions that return promises, observable-like objects, and iterables (d20c411)