Comments (9)
And no prob! Thanks for making this resource! Think it'll help a lot of folks.
from rxswift-to-combine-cheatsheet.
Thanks about the first one - regarding the second one, I guess we could add it, even though it's more like comparing
ifEmpty(default: observable)
.switchLatest()
in RxSwift - it's not really a 1v1 operator comparison. What do you think?
from rxswift-to-combine-cheatsheet.
Ok I resolved both in 3f18df3
from rxswift-to-combine-cheatsheet.
I think it's useful to show solutions even if they're more verbose. Could use a
from rxswift-to-combine-cheatsheet.
I've added it in the note instead as a direct mapping - felt better to me. The warning sign thing is also interesting, I'll give it some though :) Thank you!
from rxswift-to-combine-cheatsheet.
Could also add a note that startWith(value)
is merge(with: Publishers.Just(value))
from rxswift-to-combine-cheatsheet.
I'm worried about adding all these composition hacks but I guess if we want to provide a good bridge, it should be there.
It would be the same as using prepend
with a Just
in Combine, but that's more comparable to Observable.concat(.just("value"), stream)
then startWith
. Not too sure on where to put the line :)
from rxswift-to-combine-cheatsheet.
Oh neat! Haven't explored enough to see prepend
yet. Looks like prepend
can be used the same way startWith
is used, no? So could be considered a direct map.
from rxswift-to-combine-cheatsheet.
Actually seems to be :) I hadn't noticed before but prepend has one overaload that takes a variadic array, and one that takes a different stream (like concat).
from rxswift-to-combine-cheatsheet.
Related Issues (10)
- [Question] Publishers.Sequence? HOT 1
- Probably a spot for Maybe
- merge(maxConcurrent:) vs flatMap(maxPublishers:) HOT 1
- catch/catchError and catchErrorJustReturn/replaceError(with:) are not equal HOT 1
- PublishSubject -> PassthroughSubject? HOT 5
- RxSwift `flatMapFirst` to Combine `flatMap(maxPublishers: .max(1))`? HOT 1
- Include operators with no `Combine` equivalent HOT 2
- Does not demonstrate Publishers.CombineLatest HOT 1
- RxSwift's buffer ≠ Combine's buffer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxswift-to-combine-cheatsheet.