read url query params in react code example
Example 1: get query params react
new URLSearchParams(this.props.location.search).get("your_query_param_key")
Example 2: how to add query parameter to url reactjs
history.push({
pathname: '/dresses',
search: '?color=blue'
})
or
history.push('/dresses?color=blue')