passing data through history object react-router-dom code example
Example: react router history push parameter
this.props.history.push({
pathname: '/template',
search: '?query=abc',
state: { detail: response.data }
})
this.props.history.push({
pathname: '/template',
search: '?query=abc',
state: { detail: response.data }
})