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

Update router state properties directly #3446

Merged
merged 3 commits into from
May 9, 2016
Merged

Update router state properties directly #3446

merged 3 commits into from
May 9, 2016

Conversation

timdorr
Copy link
Member

@timdorr timdorr commented May 9, 2016

This will address the last checkbox on #3445

It will also shut me up about this comment #3445 (comment) 😄

@timdorr timdorr mentioned this pull request May 9, 2016
3 tasks
@@ -91,7 +90,7 @@ const Router = React.createClass({
} else {
// Keep the identity of this.router because of a caveat in ContextUtils:
// they only work if the object identity is preserved.
assign(this.router, this.createRouterObject(state))
updateRouterObjectState(this.router, state)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just inline this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or call it something like assignRouterState and use it in createRouterObject as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to keep the shape of router in one place, rather than having coupling to it's shape spread into two places.

Copy link
Member Author

Choose a reason for hiding this comment

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

use it in createRouterObject as well

Oh, that's a good point. One sec...

@taion
Copy link
Contributor

taion commented May 9, 2016

LGTM

@timdorr timdorr merged commit 5f3387a into next May 9, 2016
@timdorr timdorr deleted the updateState branch May 9, 2016 22:34
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants