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

loadProps in child route breaks <Link /> in react-router 2.0 #38

Closed
zackify opened this issue Jan 13, 2016 · 2 comments
Closed

loadProps in child route breaks <Link /> in react-router 2.0 #38

zackify opened this issue Jan 13, 2016 · 2 comments

Comments

@zackify
Copy link

zackify commented Jan 13, 2016

When I have

static loadProps(params, cb) {
  cb(null, { test: 'hi'})
}

inside a component, linking to that page does not work. The moment I remove the loadProps property and reload the page, using <Link /> to that page works again. The url updates but the page does not actually switch unless you do a refresh.

Edit: Also noticed this only happens when loadProps is inside of a child route component.

@zackify zackify changed the title loadProps breaks linking to different pages in react-router 2.0 loadProps in child route breaks <Link /> in react-router 2.0 Jan 13, 2016
@zackify
Copy link
Author

zackify commented Jan 13, 2016

Narrowed this down and submitted a PR #40. Looks like the component never got updated because the state never changed on route change.

@ryanflorence
Copy link
Owner

please try 0.3.0 and see if this is still a problem.

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

No branches or pull requests

2 participants