Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeremiahbiard/3e014a665fc887d3c230 to your computer and use it in GitHub Desktop.
Save jeremiahbiard/3e014a665fc887d3c230 to your computer and use it in GitHub Desktop.
// Given a route like this:
<route path="/course/:courseId" handler={Course} />
// and a URL like this:
'/course/clean-code?module=3'
// The components props will be populated
var Course = React.createClasss({
render: function() {
this.props.params.courseId; // clean-code
this.props.query.module; // 3
this.props.path; // /course/clean-code/?module=3
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment