Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Frank Pepermans
    @frankpepermans
    Sure thing, I'm more available now to patch up anything we might've missed the coming weeks too
    Brian Egan
    @brianegan
    Sounds good -- I'll publish in a bit!
    Rolly Peres
    @RollyPeres
    Hooray!
    Finally!
    Brian Egan
    @brianegan
    All right -- ran into some sneaky code coverage issues which are now resolved! Just shipped 0.23.0 -- don't forget to look at the rxdart_codemod package if you want a bit of help upgrading from 0.22.x
    Frank Pepermans
    @frankpepermans
    :fireworks:
    That fireworks emoticon is so underwhelming
    Brian Egan
    @brianegan
    Lolol
    (The crew accidentally triggered all of the fireworks for a 10-15 minute show right at the beginning)
    One small update: I realized one thing I forgot to fix was all of the API doc links in the readme. Gonna push up 0.23.1 patching those up
    Frank Pepermans
    @frankpepermans
    Hehe that's some impressive fireworks! If you can enjoy it from up in the ISS, it must be good :)
    stanislasdrg
    @stanislasdrg
    Hi guys, is the only way to initialise a ReplaySubject calling .add() at runtime ?
    .startWith() throws a type error in my case.

    ReplaySubject is in a Shared Service as such :
    ReplaySubject<bool> userProvidesLiquidity = ReplaySubject<bool>(maxSize: 1);

    And is called within one of my app's template :
    <div *ngIf="(sharedService.userProvidesLiquidity | async)">

    I am trying to init with a false value.
    If I call .add(false) in OnInit it works, I am just curious whether this is the best way to do it
    Frank Pepermans
    @frankpepermans
    startWith would be your best option
    Stream<bool> _userProvidesLiquidityWithStart;
      Stream<bool> get userProvidesLiquidityWithStart =>
          _userProvidesLiquidityWithStart ??=
              userProvidesLiquidity.startWith(false);
    stanislasdrg
    @stanislasdrg
    Unfortunately the same code throws TypeError: Instance of 'minified:iV<bool>': type 'minified:iV<bool>' is not a subtype of type 'minified:oD<bool>' if I initialise my ReplaySubject the following way :
    ReplaySubject<bool> userProvidesLiquidity = ReplaySubject<bool>(maxSize: 1).startWith(false);
    Ah ok I see
    It is a lot more verbose though.
    Thanks @frankpepermans
    Frank Pepermans
    @frankpepermans
    The getter is just a workaround so that Angular doesn't go into an update loop. On each update cycle, it will invoke your subject.startWith(), this will yield a new Stream instance on every call, causing overflow. If you store the Stream as a refernce, as with that getter, you can overcome that issue.
    Frank Pepermans
    @frankpepermans
    PS a ReplaySubject with maxSize: 1 is really a BehaviorSubject (which effectively only replays the last value on subscribe)
    stanislasdrg
    @stanislasdrg

    @frankpepermans

    The getter is just a workaround so that Angular doesn't go into an update loop. On each update cycle, it will invoke your subject.startWith(), this will yield a new Stream instance on every call, causing overflow. If you store the Stream as a reference, as with that getter, you can overcome that issue.

    Is it the startWith() that is responsible for such a behaviour ? I kind of expected the same instance to be returned each time as you have noticed.
    Frank Pepermans
    @frankpepermans
    No, it will yield a new Stream. The original Stream cannot be altered, as it might be consumed by other Subscribers. So startWith does return a new, transformed Stream.
    Think List.map, which returns an Iterable, leaving the original List untouched
    stanislasdrg
    @stanislasdrg
    @frankpepermans Thank you very much for the straightforward explanation, appreciate it.
    Byron Ferguson
    @byronferguson
    Evening all
    Dusting off a Flutter project and updating pubs
    _login
            .map<Request>(_formRequest)
            .doOnData((_) {
              _attemptLogin.sink.add(true);
            })
            .asyncMap(Auth.login)
            .doOnData((_) {
              _attemptLogin.sink.add(false);
            })
            .listen(_userAuth.sink.add);
    I can’t seem to get the latest version to execute the asyncMap()
    Frank Pepermans
    @frankpepermans
    Did the first doOnData trigger? Is Auth.login triggered?
    Frank Pepermans
    @frankpepermans
    Wheater
    @Wheater
    Not much going on in here. I'm a huge fan of RxJS and am moving over to dart to learn Flutter. I'd like to contribute in some way, is the doc a good place to start?
    Frank Pepermans
    @frankpepermans
    We can always use help :) rxdart is pretty stable currently, this channel is pretty quiet, so I assume most folks are just happy using it
    Wheater
    @Wheater
    Glad to pitch in when needed.
    Frank Pepermans
    @frankpepermans
    We're gearing up for a 1.0 release, there's a few issues on git regarding docs, or other ones
    Wheater
    @Wheater
    Awesome, I'll take a look tomorrow or Sunday hopefully.
    Frank Pepermans
    @frankpepermans
    See the current dev release, which is almost 1 to 1 with the master branch
    Wheater
    @Wheater
    What's the process to follow for PRs, fork then PR?
    Frank Pepermans
    @frankpepermans
    Yeah that's fine
    Usually @brianegan and myself review before merging, nothing special
    I guess our biggest focus is correctly informing newcomers about the differences between dart streams and observables. That remains a point of confusion for many
    Wheater
    @Wheater
    Sounds good. I am a professional dev, but new to open source, so it will take some getting used to.
    Frank Pepermans
    @frankpepermans
    No worries, we're here if you need help :)
    Wheater
    @Wheater
    Awesome! Thanks for the intro. I'll start out with docs to get familiar then move on wherever else needed :)
    Wheater
    @Wheater
    @frankpepermans which branch is the dev branch I should fork from?
    Wheater
    @Wheater
    are tests the only way to run things locally to validate any changes made? What about documentation? Can those changes be verified locally at all?