Permalink
Browse files

fix(naming): get rid of references to rxDucks missed during renaming

quack
  • Loading branch information...
benlesh committed May 12, 2016
1 parent 548274c commit 04c54c60070df0fee6b8631d0c66ce6dbccef777
Showing with 12 additions and 12 deletions.
  1. +5 −5 README.md
  2. +1 −1 src/middleware.js
  3. +6 −6 test/middleware-spec.js
@@ -14,14 +14,14 @@ NOTE: This has a peer dependencies of `rxjs@5.0.*` and `redux`, which will have
as well.

```sh
npm i -S rx-ducks-middleware
npm i -S redux-observable
```

## Usage

## Basic

With rxDucksMiddleware, you can dispatch any function that returns an observable,
With redux-observable, you can dispatch any function that returns an observable,
a promise, an observable-like object or an iterable. The basic call looks like:

```js
@@ -88,7 +88,7 @@ Below is a basic example of it how it might work in React.
import { Component } from 'react';
import { connect } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { rxDucksMiddleware } from 'rx-ducks-middleware';
import { reduxObservable } from 'redux-observable';
import * as Rx from 'rxjs';
// Just the plain redux reducer.
@@ -105,9 +105,9 @@ const reducer = (state = {}, action) => {
};
// making a store
const store = createStore(reducer, applyMiddleware(rxDucksMiddleware()));
const store = createStore(reducer, applyMiddleware(reduxObservable()));
// HERE BE THE DUCKS
// set up async dispatches here
const loadData = () => (actions, store) => Observable.of('hello world')
.delay(1000)
.map(data => ({ type: 'DATA_LOADED', data })
@@ -1,7 +1,7 @@
import { Subject } from 'rxjs/Subject';
import { from } from 'rxjs/observable/from';

export function rxDucksMiddleware() {
export function reduxObservable() {
let actions = new Subject();

let middleware = (store) => (next) => {
@@ -1,19 +1,19 @@
/* globals describe it */
import { expect } from 'chai';
import { createStore, applyMiddleware } from 'redux';
import { rxDucksMiddleware } from '../';
import { reduxObservable } from '../';
import * as Rx from 'rxjs';
import Promise from 'promise';
import 'babel-polyfill';
import $$observable from 'symbol-observable';

const { Observable } = Rx;

describe('rxDucksMiddleware', () => {
describe('reduxObservable', () => {
it('should intercept and process actions', (done) => {
const reducer = (state = [], action) => state.concat(action);

const middleware = rxDucksMiddleware();
const middleware = reduxObservable();

const store = createStore(reducer, applyMiddleware(middleware));

@@ -34,7 +34,7 @@ describe('rxDucksMiddleware', () => {
it('should work dispatched functions that return a promise', (done) => {
const reducer = (state = [], action) => state.concat(action);

const middleware = rxDucksMiddleware();
const middleware = reduxObservable();

const store = createStore(reducer, applyMiddleware(middleware));

@@ -55,7 +55,7 @@ describe('rxDucksMiddleware', () => {
it('should work with iterators/generators', (done) => {
const reducer = (state = [], action) => state.concat(action);

const middleware = rxDucksMiddleware();
const middleware = reduxObservable();

const store = createStore(reducer, applyMiddleware(middleware));

@@ -78,7 +78,7 @@ describe('rxDucksMiddleware', () => {
it('should work with observablesque arguments', (done) => {
const reducer = (state = [], action) => state.concat(action);

const middleware = rxDucksMiddleware();
const middleware = reduxObservable();

const store = createStore(reducer, applyMiddleware(middleware));

0 comments on commit 04c54c6

Please sign in to comment.