How react-router-dom4.x passes multiple parameters

pass parameters through params, but can only one parameter be passed?

//
<Route path="/Article/:id" component={Article} />
//
this.props.history.push(`/Article/${id}`)

can this method pass only one parameter? . How should I write if I pass multiple parameters?

< H2 > I think it is possible to pass multiple parameters through the query and state methods, but when the page is refreshed, the parameters are lost, which seems undesirable < / H2 >.

//
<Route path="/Article/:id/:id2/:id3/:id4" component={Article} />
//
this.props.history.push(`/Article/${id}/${id2}/${id3}/${id4}`)

or if your id passes a json string; to get the parameter, just parse the json


query can pass multiple parameters, similar to the get request of the form.
state can also pass multiple parameters in clear text. Similar to the post request of the form, the parameters are not displayed in the address bar


Why query and state lose parameters when the page is refreshed

Menu