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

React-router no longer triggers componentWillReceiveProps #3146

Closed
kayakyakr opened this issue Mar 3, 2016 · 5 comments
Closed

React-router no longer triggers componentWillReceiveProps #3146

kayakyakr opened this issue Mar 3, 2016 · 5 comments
Labels

Comments

@kayakyakr
Copy link

Version

2.0.0
React 15.0.alpha1

Issue

With React 15, the componentWillReceiveProps has been changed to be more discerning when it does fire. React-router's route changes are apparently not enough to trigger the receive props method on children, so on an initial load it works fine, but any navigation after breaks. I'm not sure what side needs the fix, if it's even fixable or force-able from react-router.

New to using React, so leave it to the new guy to break stuff.

@kayakyakr
Copy link
Author

This PR caused the change: facebook/react#5787

@timdorr timdorr added the bug label Mar 4, 2016
@timdorr
Copy link
Member

timdorr commented Mar 4, 2016

While this is against a pre-release version of React, it's good for us to stay ahead of the curve on this stuff. Do you have a test case handy?

@kayakyakr
Copy link
Author

I'm sorry, I don't. And I think my implementation might be moving away from even allowing route transitions at least for the time being, so I'll be moving toward other things.

@agundermann
Copy link
Contributor

Are you sure about this issue? I couldn't reproduce it with rc1 and one of the examples. Also, the PR reads like willReceiveProps fires more often, not less. And I don't think we're doing anything too out of the ordinary when rendering route components.

@kayakyakr
Copy link
Author

I'll see if I can put together a moment to try to recreate it with a test case or an example.

@taion taion closed this as completed Mar 17, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants