get updated route params when url updates react code example
Example 1: append a query string to the url react
history.push({
pathname: '/dresses',
search: '?color=blue'
})
Example 2: history push search params
this.props.history.push({
pathname: '/client',
search: "?" + new URLSearchParams({clientId: clientId}).toString()
})
Example 3: react get route params
const Child = ({ match }) => (
<div>
<h3>ID: {match.params.id}</h3>
</div>
)