<@U5JLY4V45> Of course when using `vararg` all the...
# rx
g
@bdeg Of course when using
vararg
all the elements will have to be of the same type (e.g.
Observable<String>
). So if your form has various types, this might me a problem. Maybe it would be better to use something like
Observable.combineLatest()
, which is parametrized (generics) and can handle up to 9 different Observables?
b
My form has the same type, and a want to use vararg to pass all variable to Flowable.combineLatest
g
Ok. So IMO you have two options: 1) Use
vararg
, or 2) Define your function exactly the same as
combineLatest()
- with the use of Generics. I think the second option is better, as it gives you the ability to have different types, if you’ll ever want them in the future
đź’Ż 1