Now, I get a question:
I want get params in a component, that component not a router component.
I write like this, but can not get param;
class TeWidgetTool extends Component {
getParams() {
console.log(this.context.router)
}
}
TeWidgetTool.contextTypes = {
router: React.PropTypes.object
};
See e.g. https://github.com/reactjs/react-router/issues/3697 and other closed issues