Skip to content

Instantly share code, notes, and snippets.

@rbaul
Created April 21, 2024 11:07
Show Gist options
  • Save rbaul/4b4f863b1128844f27c31ade989c12d7 to your computer and use it in GitHub Desktop.
Save rbaul/4b4f863b1128844f27c31ade989c12d7 to your computer and use it in GitHub Desktop.
React flux demo doOnNext and count
public class ReactDemo {
public static void main(String[] args) {
Flux.range(1,0)
.doOnNext(System.out::println)
.count().doOnNext(size -> {
if (size == 0) {
System.out.println("Size is: " + size);
}
}).subscribe();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment