history.pushState npm code example
Example 1: history.push
// usually all you need
// but you can use a location instead
const location = {
pathname: '/somewhere',
state: { fromDashboard: true }
}
history.push(location)
history.replace(location)
Example 2: history.pushstate
history.pushState(state, title[, url])