Comments (3)
If I wrap them the other way, onion state is available inside the component instantiated by modalify - but modalify fails to work, for reasons I did not debug.
@kylecordes First I'd try to figure out what went wrong with that approach. Note than when doing onionify(foo)
, the foo
is written in a way that assumes that sources.onion is available, so what onionify()
is doing is just building that sources.onion and passing it to the foo
. So replace foo
with modalify(App)
and it means modalify(App)
should be written in a way that assumes sources.onion is available.
from cycle-onionify.
@staltz It seems likely I could dig through and figure it out, the source is not very long:
https://github.com/cyclejs-community/cyclejs-modal/blob/master/src/modalify.ts
... When I get a chance I will fork both, add whatever bits of debugging I need, and track it down.
More broadly, it seems like a composeability challenge. Each add-on is written and documented and tested assuming it will be the outermost wrapper. From the point of view of each, the course of action is to put it on the outside and then go debug the other add-on to figure out why it doesn't work when it's not on the outside.
Is there any way to get traction on the broader challenge? To consume a set of Cycle add-ons, and have them compose out-of-the box? It seems like trying each permutation of nesting order and debugging why a particular combination of things doesn't work together when composed in a certain order, would not scale very well to n available add-ons of which application consumes k. I've forgotten the exact formula for permutations P(n,k), but it involves factorials, and gets ugly fast.
Maybe it will turn out that there is some set of rules and way of testing for those rules, that a Cycle add-on could follow if it needs to ship as a wrapper function, such that it can be expected to compose in a predictable way with other wrapper functions?
from cycle-onionify.
You basicly have to compose them based on the features you want where. If you want state in a modal, you would have to put the state around the modal. I have no idea why this dies not wirk, please open an issue for that.
from cycle-onionify.
Related Issues (20)
- pickCombine fails when re-adding item with same key HOT 1
- Possible to not emit until default reducer gets run? HOT 7
- Rename lens getter/setter HOT 8
- Help needed - MemoryStream.map not producing output HOT 1
- Add mock-onionify HOT 4
- Remove the .vscode folder
- Why don't provide 'pick' and 'mix' functions in xstream? HOT 4
- Shouldn't collections docs be in readme as well as release notes? HOT 2
- Add ES6 module build
- "Reducer" term is not correct HOT 1
- pickMerge throws error if child is not using sink HOT 1
- pickMerge seems to swallow events HOT 6
- type MakeScopesFn does not exist but imported HOT 1
- Shouldn't state emissions be microtask queued? HOT 6
- emitting `xs.never` with pickCombine might be wrong HOT 13
- Action stream is probably a better definition than `reducer` stream. HOT 4
- onionify typings assume "onion" as key HOT 1
- cycle-onionify when can update for rxjs@6
- cannot compile typescript examples HOT 1
- Define Omit<T, K> properly? HOT 1
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 cycle-onionify.