D
D
Dolerum2021-03-06 12:56:13
JavaScript
Dolerum, 2021-03-06 12:56:13

Analog of then() in RxJs for Observable?

Good day.

There is a Subject method - it performs certain logic.

method(data) {
this.subject.next(data);
}


Then this method () is used in another module (values ​​​​are transferred to it)

I would like to make a clean solution somehow so that I can write certain logic immediately after subject.next() is executed. That is, we need an analogue of then () in promises only for Observable. Thank you.

subject.next().then(val => val)


Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kovalsky, 2021-03-06
@lazalu68

subscribe

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question