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

Pass params and location as props in withRouter() #3444

Merged
merged 1 commit into from
May 9, 2016

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented May 9, 2016

Fixes #3439 for good as discussed in #3443 (comment).

@gaearon gaearon merged commit 17a3625 into remix-run:next May 9, 2016
@gaearon gaearon deleted the pass-stuff-to-withrouter branch May 9, 2016 20:25
@peterbsmyth peterbsmyth mentioned this pull request Jun 6, 2016
@export-mike
Copy link

export-mike commented Jun 23, 2016

@gaearon out of interest is there a reason why this isn't in v2.x.x? I'm having a go at upgrading to 3.0.0-alpha-1

@export-mike
Copy link

I've updated to 3.0.0-alpha-1 I'm fortunate my codebase just works with v3.0!

@pranavkaushik9
Copy link

I upgraded to 3.0.0-alpha-1 so that I can use withRouter. However I get
Uncaught TypeError: Cannot read property 'getCurrentLocation' of undefined
@ following line:
!history.getCurrentLocation ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You have provided a history object created with history v2.x or ' + 'earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please upgrade to history v3.x.') : (0, _invariant2.default)(false) : void 0;

Please suggest

@pranavkaushik9
Copy link

Ok, so looks like I hurried to put this comment instead of searching. I solved this using history

as explained by "gajus" here: #2866

@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.

3 participants