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 pathname and query to the argument of getInitialProps #194

Merged
merged 2 commits into from
Nov 4, 2016

Conversation

nkzawa
Copy link
Contributor

@nkzawa nkzawa commented Nov 3, 2016

Fixes #62

export default class extends React.Component {
  getInitialProps ({ pathname, query }) {
    ...
  }
}

You can access these values on both server and client.
I added description about the context object of getInitialProps to README.

@rauchg rauchg merged commit d1a0309 into master Nov 4, 2016
@rauchg rauchg deleted the fix/ctx-url branch November 4, 2016 08:05
@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