1import { useHistory } from "react-router-dom";
2
3const FirstPage = props => {
4 let history = useHistory();
5
6 const someEventHandler = event => {
7 history.push({
8 pathname: '/secondpage',
9 search: '?query=abc',
10 state: { detail: 'some_value' }
11 });
12 };
13
14};
15
16export default FirstPage;
17
18
1this.props.history.push({
2 pathname: '/client',
3 search: "?" + new URLSearchParams({clientId: clientId}).toString()
4})