React Router Pass Param to Component

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

ReactDOM.render(
    
        
            
              


        
10条回答
  •  臣服心动
    2020-11-30 20:42

    if you are using class component, you are most likely to use GSerjo suggestion. Pass in the params via props to your target component:

    exact path="/problem/:problemId" render={props => }
    

提交回复
热议问题