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.

Analog for RxJS do?

See original GitHub issue

Is there a Kefir analog to RxJS do? I’m trying to invoke an arbitrary action after returning from .map

Edit: Here is the docs for do

https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/do.md

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rpominovcommented, May 2, 2017

I still don’t understand what the issue is. Here is the full example:

const source = Kefir.sequentially(0, [1, 2, 3]);;
//transparently log values from source with 'do'
const example = source
  .map(val => {console.log(`BEFORE MAP: ${val}`); return val})
  .map(val => val + 10)
  .map(val => {console.log(`AFTER MAP: ${val}`); return val});
//'do' does not transform values
//output: 11...12...13...14...15
const subscribe = example.observe(val => console.log(val));
0reactions
sprocommented, May 2, 2017

Are you looking for onValue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

tap / do - Learn RxJS
Transparently perform actions or side-effects, such as logging. ... If you are using as a pipeable operator, do is known as tap !...
Read more >
RxJS Operators
Creation operators will be discussed in more detail in a later section. For example, the operator called map is analogous to the Array...
Read more >
Use case of Observable .do() operator (rxjs) - Stack Overflow
do() is to execute code for each event. A difference to . map() is, that the return value of . do() is ignored...
Read more >
what is alternative for tap rxjs operator? : r/Angular2 - Reddit
Hi, I'm getting tap is deprecated use an observer instead warning. what is the alternative for this operator.
Read more >
10 Need-to-Know RxJS Functions with Examples - SitePoint
Streams—or Observables , in RxJS jargon—are analogous to event listeners: Both wait for something to happen, and notify you when it does.
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