Skip to content

vic/redux-observable-adapter-xstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-observable-adapter-xstream

npm Travis

Use xstream with redux-observable

Install

This requires peer dependencies of rxjs@5 and xstream, which will have to be installed as well.

npm install --save redux-observable-adapter-xstream

Usage

This library basically will convert the RxJS ActionsObservable provided to your Epics into a xstream version. Then the xstream you return in your Epic will be converted back to an RxJS Observable inside the middleware.

import xstreamAdapter, {ofType} from 'redux-observable-adapter-xstream';

const epicMiddleware = createEpicMiddleware(rootEpic, { adapter: xstreamAdapter });

// your Epics are now xstreams

const pingPongEpic = action$ =>
  action$
    .filter(ofType(PING))
    .map(action => ({
      type: PONG
    }));

About

Use xstream with redux-observable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •