Comments (6)
Hey @ntilwalli I think onionify currently has the race condition problems that cycle/run used to have (with regard to cross-driver startup). So either we replicate that solution in this codebase, or wait for the next version of Cycle.js where onionify could be used as a "plugin". I prefer the latter but we can also do the former (PR please?).
But batching state updates as one scheduled state update sounds good. Smart idea
from cycle-onionify.
Thanks for the response. I could def PR this, after looking at the solution in run
. How would the plugin architecture fix this? Or are you just saying if we waited until the next version of Cycle is released, we could avoid fixing this twice?
from cycle-onionify.
Hey Nikhil, if we get a PR, it should use a buffer like in cycle/run and this is overall a synchronous approach. So please don't send a PR to add delays because that's not a good solution (it adds noticeable disadvantages to other users and use cases).
The plugin system would help because then onionify would be like a "driver", and then it would use the solution that is currently inside cycle/run.
from cycle-onionify.
Yeah, the delay/debounce approach is not appropriate. I had updated my comment to indicate that. I'll look at how it was accomplished in run
. I'm surprised that you're proposing onionify as a driver in the next version of cycle. I thought drivers are specifically associated with sinks that have side-effects. I assumed onionify would be a pure adapter in that architecture. Has your thought-process changed or am I misunderstanding?
from cycle-onionify.
I thought drivers are specifically associated with sinks that have side-effects. I assumed onionify would be a pure adapter in that architecture. Has your thought-process changed or am I misunderstanding?
Yes it would not be a driver, it would be a plugin, that's why I referred to it as "driver" with quotation marks two comments above.
from cycle-onionify.
Being a pure-plugin (adapter?) means there's no interaction with run
, so even in the new architecture it wouldn't get the benefit of the built-in microtask queueing. Pure-plugins like onionify
would need to implement the queueing for themselves similar to what I'm doing in the PR.
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
- 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.