Комментарии:
if i do exactly but with students instead of clients than i get an error TS2345: Argument of type 'MonoTypeOperatorFunction<Student[]>' is not assignable to parameter of type 'OperatorFunction<(DocumentData | (DocumentData & { id: string; }))[], Student[]>'. I honestly never saw that before.
ОтветитьThis a great channel. I don't use Angular - never have, never will, but I do use NestJS quite often and it's "Angular-inspired" and uses RxJS under the hood. Sometimes I need to tap into their use of observables and I never understand RxJS very well, but these videos help.
ОтветитьPleeease add returntypes to your methods 🥲
ОтветитьYour communication skills are next level. Kudos and thank you! 🎉🎉🎉
ОтветитьThis channel is a must-follow for any Angular Dev
ОтветитьGreat video, Joshua!
One thing though, in "watchClient" you could have used "filter" operator instead of "map" with "find".
great video, thanks a lot <3
ОтветитьFor the people watching this almost a year later, Ben Lesh (RxJS dev) recommends using share({connector: new ReplaySubject(1)}) instead of shareReplay({bufferSize: 1, refCount: true}). It's the equivalent; the refCount is already set to true in the share() operator. The RxJS devs said they would probably deprecate shareReplay(1) in the future like the other multicasting operators such as: multicast, publish, publishReplay, publishLast, and refCount (already deprecated in RxJS 7). shareReplay still only exists due to its popularity and is now a wrapper around the highly configurable share operator. Source: Reactive Patterns with RxJS for Angular (e-Book)
ОтветитьFinally found someone who not just knows it deep but is able to explain it ! Thanks
ОтветитьThank you!
ОтветитьYou really should show it how it works with real data flowing and not just with showing code.
ОтветитьWhat if we have 2 different components? Say a list of clients, which upon clicking on a client name, it redirects to the client detail page. Will that still make use of the shareReplay observable and act like a centralised hub of data, akin to data management like ngrx? Thanks :)
ОтветитьHi Joshua great video, a question about the check to see if you have clients, in a case where the request returns a subset of clients and need the next subset how would you do that?
ОтветитьIf the getClients() only calls once, how often the collectionData (Firebase ?) will sync with the DB? Could that be configurable? Great stuffs and thanks.
ОтветитьReally nice content and well explained, but I just got a few notes you might want to take into your next video:
- avoid implicit any as return-type for methods (eg. getclients() )
- maybe show the approach on how to build a ReplaySubject itself instead of an Observerable object
- import stricter linter rules
These are all optional but IMHO make the code alot more understandable/readable.
Thanks for amazing content as usual . Can u also make a video explaining difference between behavioural subject vs replay subject vs share replay and the whats the best scenario to use them. Couldn't understand that because rxjs docs are not that good IMHO
ОтветитьThanks for providing that detailed insight.
Could you create a video on how to implement the updateClient methods etc. for that performant version as I am having my struggles on adapting to the other methods.
The way you explain the details is just awesome. Keep these rxjs videos coming. Thanks
ОтветитьThe refCount was the icing on the cake 👌
ОтветитьThanks for sharing!
Ответить