Skip to content

Conversation

@iv-mexx
Copy link
Contributor

@iv-mexx iv-mexx commented Nov 20, 2016

This resolves #6

I tried to stick to stick to the existing playground documentation for Signal and SignalProducer.

I've also updated the Properties part in FrameworkOverview.md.
This document is duplicated in ReactiveCocoa, either it should be updated there as well, or the documentation should be de-duplicated between ReactiveCocoa and ReactiveSwift?

@andersio
Copy link
Member

It seems natural to host them in ReactiveSwift. Perhaps we could turn them into links in ReactiveCocoa, hmm?


The `<~` operator can be used to bind properties in different ways. Note that in
all cases, the target has to be a [`MutablePropertyType`][Property].
all cases, the target has to be a [`BindingTarget`][BindingTarget], [`MutableProperty`][MutableProperty] is the only property that implements this.
Copy link
Member

@andersio andersio Nov 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BindingTarget is a concrete type. Maybe

binding target, represented by BindingTargetProtocol

instead?

Moreover, MutableProperty is not the only property type that can be a target, since it inherits the capability from MutablePropertyProtocol. I'd prefer to say:

All mutable property types are inherently a binding target.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@iv-mexx
Copy link
Contributor Author

iv-mexx commented Nov 21, 2016

It seems natural to host them in ReactiveSwift. Perhaps we could turn them into links in ReactiveCocoa, hmm?

I agree that the documentation for things implemented in ReactiveSwift should be hosted in ReactiveSwift.
On that note, I've just noticed that DynamicProperty is not in ReactiveSwift but in ReactiveCocoa, so I removed the mention from the FrameworkOverview.

Still not sure if the Documentation in ReactiveCocoa should just link back to ReactiveSwift or be complete, maybe I'll just try both and see how it feels...

so their changes should be observed through other mechanisms.
[`MutableProperty`][Property] should be preferred over dynamic properties
whenever possible!
[ReactiveCocoa][ReactiveCocoa] implements a number of extensions on AppKit and UIKit to allow observation of and binding to properties via the `.reactive` structure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this mention of ReactiveCocoa.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

property.value = 2
}

scopedExample("`skipRepeats`") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a duplication of the more-complete example below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I created the more complex example for uniqueValues first and then decided to use the same sequence for skipRepeats as well to better illustrate the difference.
I'll clean up the simple example.

@mdiep
Copy link
Contributor

mdiep commented Nov 21, 2016

Thanks for the PR!

I think we can focus on ReactiveSwift here, without mentions of ReactiveCocoa. ReactiveCocoa doesn't need to duplicate the information here, but could link to it. Adding a page to RAC that explains DynamicProperty would probably be a good idea.

@iv-mexx
Copy link
Contributor Author

iv-mexx commented Nov 21, 2016

Alright, @mdiep I've addressed your comments

@mdiep
Copy link
Contributor

mdiep commented Nov 22, 2016

Thanks @iv-mexx! This is great. ✨

@mdiep mdiep merged commit a0d94e1 into ReactiveCocoa:master Nov 22, 2016
@iv-mexx
Copy link
Contributor Author

iv-mexx commented Nov 22, 2016

Thanks! I'll probably look into the documentation some more soon

@iv-mexx iv-mexx deleted the feature/propertyDocumentation branch November 29, 2016 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Property's Page @ Playground

3 participants