Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a link to "State Updates are Merged" in the forms doc #8851

Merged
merged 4 commits into from Jan 23, 2017

Conversation

keyz
Copy link
Contributor

@keyz keyz commented Jan 23, 2017

@@ -231,6 +231,8 @@ class Reservation extends React.Component {
}
```

Since `setState()` automatically merges a partial state into the current state ([State Updates are Merged](/react/docs/state-and-lifecycle.html#state-updates-are-merged)), we only needed to call it with the changed parts.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's just make "merges a partial [...]" itself a link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Updated.

@@ -231,7 +231,7 @@ class Reservation extends React.Component {
}
```

Since `setState()` automatically merges a partial state into the current state ([State Updates are Merged](/react/docs/state-and-lifecycle.html#state-updates-are-merged)), we only needed to call it with the changed parts.
Since `setState()` automatically [merges a partial state into the current state](/react/docs/state-and-lifecycle.html#state-updates-are-merged), we only needed to call it with the changed parts.
Copy link
Collaborator

Choose a reason for hiding this comment

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

For consistency let's put this paragraph after the link. In fact maybe after the property explanation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍. If we also rename nextState to partialState in the property explanation will it be more clear?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or pendingState, which is more accurate here.

@gaearon
Copy link
Collaborator

gaearon commented Jan 23, 2017

Added a few tweaks of my own (use form and label for accessibility, add a br).

gaearon pushed a commit that referenced this pull request Jan 23, 2017
* Added a link to "State Updates are Merged"

* better inline links

* moved the explanation down

* Minor unrelated tweaks

(cherry picked from commit eb89bc4)
@keyz
Copy link
Contributor Author

keyz commented Jan 23, 2017

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants