Comments (8)
@bpinto Done. Let me get a release out this weekend.
from kefir.
Without having investigated, the issue is probably less about synchronous emit and more about the circular dependency between a
& b
.
from kefir.
yes, there is a cycle, but it is not infinite and is actually done to illustrate an issue
Here is another more dirty example that produces the same result
let e;
Kefir.stream((emitter) => { e = emitter; })
.debounce(100)
.withHandler((emitter, event) => {
if (event.type === 'value' && event.value === 1) {
e.emit(2);
}
emitter.emitEvent(event)
}).log();
e.emit(1);
Actually I created PR that should highlight where the issues seems to be. And there are similar problems in buffer-by
, buffer-while-by
(I just wanted to create cleaner test case before creating separate ticket)
from kefir.
This is documented behaviour:
Although documentation might be more clear probably. My idea was back then is that synchronous events is not a use case I wanted to support well in the library in general.
from kefir.
@rpominov I'm not following documentation quote, for me it sound like a different case, which I never faced 🙂
This issue is not with the fact that some value is emitted without being debounced, but completely wrong value (null
) being emitted
Also I've provided 2nd example that doesn't use properties and here is 1st example without using properties either
const a = Kefir.pool();
const b = a.debounce(100).spy();
a.plug(b.filter((val) => val === 1).map(() => 2));
a.plug(Kefir.stream(emitter => { emitter.emit(1) }));
a.observe();
from kefir.
@rpominov The issue isn't that it's emitted synchronously (it actually isn't, according to the issue description), but that the second event is dropped.
from kefir.
Ah, right, sorry
from kefir.
Hey guys, @betalb opened a PR fixing this, do you think we could merge their PR?
from kefir.
Related Issues (20)
- KefirJS and WebSockets HOT 4
- Only `sampledBy` is past tense
- Current state policies HOT 2
- Idea: Usable as AsycInterator
- Proposal to add `fromProperty` static function HOT 15
- Static Land interop `Observable` definition is wrong HOT 5
- Shouldn't a property only emit on "new values"? Proposing `onChange()` HOT 1
- Missing type for `unplug`
- Maintain TypeScript types? HOT 4
- Stop bundling `symbol-observable`
- TypeError: this._emitValue is not a function HOT 1
- Make subscription available inside callback HOT 8
- A big "Thank You" to Kefir developers HOT 1
- How to import Kefir within Rollup library HOT 3
- groupBy function HOT 8
- flatMapConcat should work when a spawned observable ends synchronously on activation
- Add documentation to "Kefir.pool" as "Rx.Subject equivalent" HOT 2
- Is it possible to not activate a staled observable when reactivating flatMapLatest? HOT 8
- Russian docs translate
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 kefir.