How to include the Match object into a ReactJs component class?
React-Router's Route
component passes the match
object to the component it wraps by default, via props. Try replacing your constructor
method with the following:
constructor(props) {
super(props);
this.state = {
instructors: [],
instructorID : props.match.params.instructorID
};
}
Hope this helps.