question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Merge stream delay

See original GitHub issue

As the following code:

const mixStream = flyd.merge(stream1, stream2)

const mixScan = flyd.scan((o, n) => { return {
  a: scanStream1(),
  b: scanStream2()
} }, {
  a: 0,
  b: 0
}, mixStream)

I expect mixScan to show the result from both stream 1 and 2 updates. I did, but with a 1 step behind. Given stream1 <-- [1,2,3] then stream2 [4,5,6], this is the result for mixScan

mixScan stream1 stream2
{a:0, b:0}
{a:0, b:0} 1
{a:1, b:0} 2
{a:2, b:0} 3
{a:3, b:0} 4
{a:3, b:4} 5
{a:3, b:5} 6

Please find https://github.com/meepeek/meiosis-react-example for working example

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
nordfjordcommented, Aug 30, 2018

Okay I looked at your App.jsx file since I happened to have time.

https://github.com/meepeek/meiosis-react-example/blob/master/src/App.js#L12

Change this line from

const mixUpdate = flyd.merge(componentA.update, componentB.update)

to

const mixUpdate = flyd.merge(componentA.listener, componentB.listener)

And things will work like you expect

0reactions
nordfjordcommented, Aug 31, 2018

I take it by the thumbs up this issue is resolved, I’ll close it, but feel free to reopen if this did not help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I merge audio and video stream with delay
So I have to merge it with a delay! I tried already this command: mkvmerge video.m2v audio.m4a -o output.mkv --sync 1:13000. but no...
Read more >
Estimation of major stream delays with a limited priority merge
The purpose of this paper is to develop an estimation model for major stream delays at an unsignalized intersection under limited priority conditions....
Read more >
Prediction of minor stream delays at a limited priority freeway ...
Minor stream delay is a particularly useful measure of effectiveness for uncongested freeway merging as it relates directly to the distance required to...
Read more >
ETHEREUM MERGE DELAY AGAIN? !!!! - YouTube
Ethereum Merge DelayLooks like some recent info is floating around that may end up cause a delay to the Ethereum merge from proof...
Read more >
feature fw_retract and test stream delay macro #28 ... - GitHub
merge develop: feature fw_retract and test stream delay macro #28 #76. Sign in to view logs · Sign in to view logs. Usage....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found