bloc
bloc copied to clipboard
question: Merge transformers
Description
How can I apply multiple transformers to the same incoming event stream? Say, I want to apply sequential(), but I also want to apply debounce.
I've received an answer from some Korean YT channel https://www.youtube.com/watch?v=RIqfOm0hp6Q
EventTransformer<E> debounceSequential<E>(Duration duration) {
return (events, mapper) {
return sequential<E>().call(events.debounce(duration), mapper);
};
}
Should be in the manual, I believe!
Hi @subzero911 👋 Thanks for opening an issue and glad you found a solution. A variation of this is included as part of the GitHub Search Example and you can see another example in the VGVentures Bloc Concurrency Demos Repo.
I'll update the core concepts shortly 👍