You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a serch that each time that you type a character it launches a request. The problem is that if I don't cancel I could have this race condition:
Action Search "mv"
Action Search "mvf"
Mutation with items from "mvf"
Mutation with items from "mv"
At the end the user sees the results of "mv" instead of "mvf".
If I can cancel the collection of the current old flow I would fix it. Maybe there is other way to avoid this problem. I tried out this one: badoo/MVICore#68 (comment) but Flow doesn't have a takeUntil.
The text was updated successfully, but these errors were encountered:
This is indeed an interesting scenario (and I've needed this in other MVI libraries). I haven't had time to look into this so I don't yet know if it would be easy to plug this functionality or if it would require more significant changes. I'll try to have a look and post something, but I don't know when that will be possible.
Anyway, the source is relatively small so I would suggest you try it yourself. I'm happy to help too (within my time availability).
I have a serch that each time that you type a character it launches a request. The problem is that if I don't cancel I could have this race condition:
At the end the user sees the results of "mv" instead of "mvf".
If I can cancel the collection of the current old flow I would fix it. Maybe there is other way to avoid this problem. I tried out this one: badoo/MVICore#68 (comment) but Flow doesn't have a
takeUntil
.The text was updated successfully, but these errors were encountered: