Comments (6)
@goshakkk @nickbalestra I'm thinking of this:
// `Cycle` can be xstream or rxjs or anything else
var output = Cycle.run(main, { ACTION: makeActionDriver(), STATE: makeStateDriver() })
const cycleMiddleware = createCycleMiddleware(output);
Problem is that the ACTION driver needs access to store
so we need to create the drivers in the middleware (as it is now).
Maybe we can just keep the API as it is, but add an extra arg to createCycleMiddleware
which is the actual run
method to use internally:
import {run} from '@cycle/xstream-run';
const cycleMiddleware = createCycleMiddleware(main, { HTTP: makeHTTPDriver() }, run);
Thoughts?
from redux-cycles.
The second one with passing run
looks more appropriate.
One thing worth keeping in mind is the fact that Cycle might become xstream-only internally and will make users themselves responsible for converting sources from xstreams and sinks to xstream if they choose to use another library. It's not set in stone yet, of course, but here is the thread for reference: cyclejs/cyclejs#425
from redux-cycles.
from redux-cycles.
Interesting, does this mean that all drivers must be xstream compatible?
from redux-cycles.
@goshakkk it doesn't seem like Cycle will be xstream-only: https://gitter.im/cyclejs/cyclejs?at=585bcfc496a565f844067997
Unless I misunderstood what you were trying to say.
from redux-cycles.
Ah it seems that the only difference is that we won't have to use runStreamAdapter. But passing the run
is something that we'll need to do in order to support other stream libs.
from redux-cycles.
Related Issues (20)
- Package dependencies HOT 2
- Example failing tests HOT 1
- Travis for `example` dir HOT 8
- Slides
- State should be passed with the action HOT 19
- WebpackBin cannot resolve redux-cycles HOT 1
- Hot reloading HOT 4
- Action from an http requetis fired twice HOT 3
- TypeScript Type Declarations HOT 3
- Request for a complex real world example HOT 2
- Typescript definitions are not added to the build HOT 6
- relative preset "es2015" not found with create-react-native-app HOT 1
- scheduleMicrotask is not a function HOT 4
- Is this project still active/maintained? HOT 2
- Simplest "PING/PONG" example in README.md has no 'rootReducer'
- What are the $s in variable names? HOT 1
- New test helpers? HOT 2
- Keep getting generic type parameter errors during compile
- Linter HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-cycles.