V
V
ValeraNakhuy2019-10-14 03:30:43
JavaScript
ValeraNakhuy, 2019-10-14 03:30:43

How do I properly cache requests with RXjs?

The situation is this.
There is a text. Every text change and I send a request. In the answer, the text is divided into parts.
Then I send each part to the server again.
Example:
Request - Response
1234567 => [1], [2], [3,4], [5, 6, 7]
Request queue
[1] => [2] => [3,4] => [5 ,6,7]
Change the text
Request - Answer
12334567 => [1], [2], [3,3,4], [5, 6, 7]
Here I want to compare the previous answer with the new one, weed out what is already there, to send only
[3, 3, 4]
I decided to make it all a stream, and finally deal with RxJS.
Actually looking for RxJS way

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question