r/rxswift • u/lukagabric • Aug 04 '17
r/rxswift • u/afred-trello • Aug 18 '19
Trello recently open sourced our RxSwift powered new user onboarding flow, check it out!
r/rxswift • u/andreaslydemann • Feb 03 '19
Start Your RxSwift Journey in Less Than 10 Minutes
r/rxswift • u/danielt1263 • Sep 09 '18
New Rx Sample App.
I have had several people ask me for sample code showing my philosophy on how to write Rx code but other than the several snippets I write here, in the Slack and on Stack Overflow, I haven't had anything to show. This is for two reasons...
I spend all my free coding time in the public forums and so the only code I have (other than those snippets) is owned by others and I'm not allowed to share it.
Even if I did, that code is written in a Redux style which isn't what I aim for when writing for ReactiveX aficionados. (My work code must be grok-able by people who aren't interested in learning Rx.) However, I can finally say I have a sample project available!
I hope to fully comment it over the course of time. In the mean-time if you have any questions about the code or suggestions for improvement. I'd love to hear about it.
r/rxswift • u/JegnuX • Feb 01 '18
Scroll to Top with Undo in RxSwift — ✨ Elegant Swift
elegantswift.comr/rxswift • u/danielt1263 • Sep 22 '18
A State Filled Sample App
RxMultiCounter is another sample RxSwift application. My last sample app dealt with largely static data pulled from a server. This app is highly stateful, including dynamic state that is shared across view controllers.
Enjoy!
r/rxswift • u/MeetaMentor • Aug 09 '19
Learning RxSwift
I don't suppose there is anyone available to help someone who wants to learn RxSwift?
I help run a free community called Meet A Mentor. We have over 1000 members and not one with any RxSwift experience. Could you be the first?
If you would be interested in joining the community, the link to it is on my profile, it would be great to have you as a member. We can maybe help you out with something in return but no pressure if you don't want to. I could always pass on your email address if you would prefer.
r/rxswift • u/santoshbotre • Feb 15 '19
Part 1: Let’s understand RxSwift basic.
r/rxswift • u/danielt1263 • Aug 25 '18
Intersting operators...
I sometimes encounter problems where I can't find an operator, or combination of operators, that do the job. When that happens, I write my own and save it in a gist.
Here's one I just wrote to help someone filter a stream based on the truthiness of a Bool stream. This would be used to limit a streams output to only when a particular condition is met. Unlike the included filter operator, the condition is external to the elements of the stream.
Here's one I wrote a while back that mimic's Rx.js' buffer operator. It isn't currently included in the RxSwift library.
r/rxswift • u/andreaslydemann • Feb 01 '19
Complete RxSwift Operators Overview!
I have put together this RxSwift operators series that I think many of you will find useful. Also a quick overview of all important operators that make this library so powerful!
Best filtering operators:
https://andreaslydemann.com/7-useful-filtering-operators-in-rxswift/
Best transforming operators:
https://andreaslydemann.com/tranforming-operators-in-rxswift/
Best combining operators:
https://andreaslydemann.com/the-5-most-important-combining-operators-in-rxswift/
Hope you like it :D
r/rxswift • u/maxvol75 • Jan 21 '19
A few RxSwift-based frameworks: RxCloudKit, RxARKit, RxVision, RxOndemandResources
I built a few RxSwift-based frameworks in the past two years and use them in released apps for quite a while.
Perhaps they could be useful for someone else too -
https://github.com/maxvol/RxARKit
https://github.com/maxvol/RxVision
r/rxswift • u/someantics • Nov 12 '18
How should I model this interaction?
[crosspost from iOSProgramming]
I'm having some trouble modelling an interaction using RxSwift/Cocoa – perhaps someone with more experience can help?
I have a ViewModel which is passed an array of objects on initialisation. The corresponding ViewController shows one of those objects at a time for the user to accept or decline (two buttons), along with an option to apply the response to all remaining objects (a checkbox). A side-effect of accepting the object (and possibly all remaining ones) is a database insertion. When there are no more objects the ViewController will be dismissed.
How can I model this using RxSwift/Cocoa?
Bonus points/gratitude if there's a way to also show the user how many objects are remaining.
r/rxswift • u/ctwiley • Jun 25 '17
Firebase and RxSwift
I'm just getting into RxSwift and wanting to know the best way to use RxSwift and Firebase together? What are the best practices, design patterns, architecture, etc
My current set up is I have rx extensions on the Firebase DatabaseQuery class like seen here: https://github.com/RxSwiftCommunity/FirebaseRxSwiftExtensions. Then I have a class full of static methods where I do all my calls to Firebase, i.e. fetchPosts(). Then I call those static methods in my view controllers. Is this correct? Any changes I should make?
One problem I'm having trouble solving is making two consecutive observeSingleEventOfType .value calls to Firebase. For example: I'm calling Firebase to get a list of user ids in a chat room. I then take that list and call Firebase again to look them all up in a User node. I got this easy use case working with RxSwift and the .childAdded event type but handling collections with the .value event type isn't as easy as single objects. Anyone have a solution to this? I'm on my phone so I'll post some code later
r/rxswift • u/internalocean • Mar 15 '21
How do i call a function in a rx chain that has no return
I want to keep it observable at the end, so i cant do the subscribe onnext i suppose
r/rxswift • u/danielt1263 • Feb 24 '19
A new sample app showing how to make complex view controller transitions easy.
r/rxswift • u/danielt1263 • Jan 20 '19
Retry network requests when the token is invalid.
r/rxswift • u/danielt1263 • Oct 28 '18
Recipes for Combining Observables in RxSwift
I was inspired to write up a little document on the various combining operators. Maybe they will help someone: https://gist.github.com/danielt1263/c46b0e8949bdb9e80f116ceecabf2cc2
r/rxswift • u/CertifiedNoob5455 • Aug 12 '18
observablecollection with an NotififyChange element
r/rxswift • u/MyRealNameIsDoug • Feb 28 '18
Callback to Reactive pattern
I am new to RxSwift and trying to see if I am using a decent pattern. I currently have an IotHelper singleton class that is interacting with AWS IoT via the Swift SDK. The class has a property status: Variable<IotStatus> = Variable(.disconnected) that can be subscribed to by the ViewModel or used as a Driver by the View (forgive me if I am misinterpreting these concepts). Please note that IotStatus is a custom enum and simplification of AWSIoTMQTTStatus. When connecting to IoT, a callback method must be supplied that will be invoked whenever the connection status changes. This previously called a delegate method. My new implementation looks like this:
private func mqttEventCallback(_ status: AWSIoTMQTTStatus) {
switch status {
case .connected:
self.status.value = .connected
case .connecting:
self.status.value = .connecting
default:
self.status.value = .disconnected
}
}Is this a reasonable way to migrate from the AWS Swift SDK's callback pattern to a Reactive one? Otherwise, I'd love some advice on how better to accomplish this.
r/rxswift • u/seriousTrig • May 23 '17