React Router Pass Param to Component

后端 未结 10 1268
南方客
南方客 2020-11-30 20:06
const rootEl = document.getElementById(\'root\');

ReactDOM.render(
    
        
            
              


        
10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 20:39

    In addition to Alexander Lunas answer ... If you want to add more than one argument just use:

    
    
    export default class DetailsPage extends Component {
      render() {
        return(
          

    {this.props.match.params.id}

    {this.props.match.params.title}

    ) } }

提交回复
热议问题