React Router Pass Param to Component

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

ReactDOM.render(
    
        
            
              


        
10条回答
  •  时光取名叫无心
    2020-11-30 20:57

    Another solution is to use a state and lifecycle hooks in the routed component and a search statement in the to property of the component. The search parameters can later be accessed via new URLSearchParams();

    
                

    {this.state.foo}

    ) } }

提交回复
热议问题