Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Wheater
    @Wheater
    If you think there is value in taking a look at that, I will work on it. It does seem nice to be able to chain combineLatest instead of using the static operators.
    Frank Pepermans
    @frankpepermans
    @Wheater sounds good, but keep in mind that the proposed extension in that issue is not good enough.
    Wheater
    @Wheater
    I will look more in-depth later. What are the known issues with it at the moment?
    Frank Pepermans
    @frankpepermans
    A stream can be single or broadcast, if we return combineLatest2 inside, then that specificity will be lost.
    ...so we need it as a transformer, I can help out tomorrow
    Wheater
    @Wheater
    I think the issue was referring to using it as an operator/transformer IIRC. I will check again later this evening.
    If I get a chance, I hope to have something out to review for tomorrow, but more likely later this week.
    Frank Pepermans
    @frankpepermans
    European timezone, so getting late here
    Sure no probs
    Wheater
    @Wheater
    Have a good evening!
    Frank Pepermans
    @frankpepermans
    U2!
    Wheater
    @Wheater
    @frankpepermans RxJS released a new creation function called "partition" which creates two observables from a true/false statement. I've been waiting for something like this for a while and think it would be a good add for RxDart. Thoughts?
    const [clicksOnH1$, clicksElsewhere$] = partition(clicks$, event => event.target.tagName === 'H1');
    Frank Pepermans
    @frankpepermans

    Yeah, was pondering about partition as well a while ago, thing is, it doesn't work out nicely without destructuring, e.g.
    final s1, s2 = stream.partition(...)

    If you yiled a List, then there is the danger of losing type safety, e.g.
    final list = stream.partition((event) => event is String);
    the List would need to be a List<Stream<dynamic>>

    Ultimately, using a new type, like Pair<S, T> could be best, to return a partition result. This object would then have 2 getters which can be typed

    (and Dart does not have destructuring, like Js does)
    Wheater
    @Wheater
    do you know if it's a planned feature?
    Frank Pepermans
    @frankpepermans
    yes, it will probably be added at some point, there is a proposal, I think they mention it in that issue
    Wheater
    @Wheater
    It would be a nice RxDart feature prior to destructuring, just with worse developer experience. It could be upgraded once destructuring is available. Though I wonder about the issue of breaking changes.
    Frank Pepermans
    @frankpepermans
    feel free to create a PR for it, or to add an issue so we can discuss it at github
    issue is probably safer
    Wheater
    @Wheater
    Sounds good
    Wheater
    @Wheater
    I submitted an issue for partition with example code. Let me know what you think.
    Wheater
    @Wheater
    @frankpepermans is it possible to return a Future from exahustMap?
    Frank Pepermans
    @frankpepermans
    What do you mean exactly?
    There's toList, which works on any Stream
    Frank Pepermans
    @frankpepermans
    Version 0.24.0 was just released - see https://pub.dev/packages/rxdart#-changelog-tab-
    Wheater
    @Wheater
    nice job!
    Any thoughts on the partition issue?
    Frank Pepermans
    @frankpepermans
    I think it would be nice, if we had destructuring. Currently, stream.where is pretty much the same, no?
    Wheater
    @Wheater
    Not familiar with stream.where honestly. I'll take your word for it.
    Wheater
    @Wheater
    Thinking about stream.where, are you repeating yourself by having the same predicate twice?
    Partition would enable using only a single predicate and returning the two different streams, thus not violating DRY.
    Frank Pepermans
    @frankpepermans
    Not saying we shouldn't have partition, but it would just be much nicer once destructuring lands (eventually).
    Wheater
    @Wheater
    Sure
    Frank Pepermans
    @frankpepermans
    In the meantime, 2 wheres are not that bad
    kimjisung78
    @kimjisung78
    Hello. I have made pagination using by rxdart. Which Subject choose?
    Frank Pepermans
    @frankpepermans
    @kimjisung78 that's a pretty vague question, are you asking what the different Subjects do?
    kimjisung78
    @kimjisung78
    I'm sorry to leave you with such a difficult question. I can’t understand the difference between PublishSubject and BehaviorSubject. And I don’t know “Which one is better if I want to make pagination?”
    Frank Pepermans
    @frankpepermans
    @kimjisung78 they both allow multiple subscribers, but the difference is that when subscribing to a BehaviorSubject, then the last added event will be replayed immediately.
    schmidtfx
    @schmidtfx
    Hello everyone, I'm fairly new to rxdart. I have heard about doOnDone. How would I trigger the done on an subject?
    Frank Pepermans
    @frankpepermans
    @schmidtfx you need to call close()
    Deva Palanisamy
    @devapalanisamy
    Hi, is there guide when to use operator and which operator to use for rxdart? Thanks
    Frank Pepermans
    @frankpepermans
    RxDart has much in common with RxJs, or other Rx implementations, we don't have an equivalent in RxDart
    Deva Palanisamy
    @devapalanisamy
    @frankpepermans thanks for creating powerful library
    Matias Meno
    @enyo
    Hi! Just made the 22_to_23 switch
    so far everything seemed to work fine, but there's one error that I get now:
    .shareValue() doesn't exist anymore
    Ah!