append a query string to the url react

JavaScript
history.push({
  pathname: '/dresses',
  search: '?color=blue'
})
Source

Also in JavaScript: