React Router Pass Param to Component

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

ReactDOM.render(
    
        
            
              


        
10条回答
  •  孤独总比滥情好
    2020-11-30 20:59

    Use render method:

    {
        
    }} />
    

    And you should be able to access the id using:

    this.props.id
    

    Inside the DetailsPage component

提交回复
热议问题