Created
January 1, 2016 04:27
-
-
Save jeremiahbiard/3e014a665fc887d3c230 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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