Anexar uma sequência de consulta ao URL React
history.push({
pathname: '/dresses',
search: '?color=blue'
})
Average Ape
history.push({
pathname: '/dresses',
search: '?color=blue'
})
this.props.history.push({
pathname: '/client',
search: "?" + new URLSearchParams({clientId: clientId}).toString()
})
if (history.pushState) {
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?myNewUrlQuery=1';
window.history.pushState({path:newurl},'',newurl);
}