Skip to content

Instantly share code, notes, and snippets.

@andyarvanitis
Last active December 18, 2015 09:19
Show Gist options
  • Save andyarvanitis/5760710 to your computer and use it in GitHub Desktop.
Save andyarvanitis/5760710 to your computer and use it in GitHub Desktop.
Trivial example of using ReactiveCocoa with Eero.
#import <Foundation/Foundation.h>
#import <ReactiveCocoa/ReactiveCocoa.h>
interface Reactive
property (retain)
String name
String address
registerProperties
end
implementation Reactive
registerProperties
RACAble(self.name).subscribeNext: (String newName | Log('Name changed to %@', newName))
end
int main()
object := Reactive.new
object.registerProperties
object.name = 'eero'
object.name = 'saarinen'
return 0
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment